Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: bbpress is slow like godaddy says?


_ck_
Participant

@_ck_

I’d like to see some feedback on my experimental NFS detector below.

Be sure to chmod 777 it after you upload or it won’t work.

Delete after you are finished with it for security.

Dreamhost takes over 7 seconds, sometimes more.

My apache servers with local storage take less than one second.

My Windows XP with XAMPP takes 12 seconds (old slow IDE drives)

<?php
/*
Experimental NFS detector - upload this file to server and chmod 777
Script should take less than one second to run.
If it takes more than one second, then it's likely NFS (or Windows or a bad configuration)
Any error means the time is unreliable as the script has failed.
*/
error_reporting(E_ALL); $file=__FILE__; $time=strtok(microtime(),' ')+strtok('');
for ($i=0; $i<=9999; $i++) {if (touch($file)) {clearstatcache(); filemtime($file);} else {break;}}
echo ((strtok(microtime(),' ')+strtok(''))-$time)." seconds";
?>

Skip to toolbar