views:

32

answers:

2

Hi, i want to use apc in php, to avoid disc reads when including files. But how can i know if files are really coming from shared memory, instead of disc reads? Does anyone know how to measure the number of disc reads for a php script, or in a time interval? (on windows server 2003) Thanks a lot in advance,

regards,

Charles

+2  A: 

APC has an info page APC.php which will answer a lot of your questions: http://www.electrictoolbox.com/apc-php-cache-information/

Using a Ram Disk you can force a cache to use RAM instead of a slow disk drive. Another possible solution is to use Solid State Drives (SSDs) which have much faster read speeds compared to platter drives. Setting up a RAID0 of fast SSDs would improve cache performance.

Rook
Thanks fort the anwsers!I am familair with the output of APC.php. But i rather have the number of disc reads from an other source, because that will be more objective. An USB drive would be more objective, but is less usefull for a remote server.Measuring the number of disc reads (per time interval, or perphp-script) seems a verry basic thing to me. Does anyone knows how to do that (on windows)?regards,Charles
A: 

But how can i know if files are really coming from shared memory, instead of disc reads?

One simple solution might be to place the files in a USB drive (one of those that has a LED light for disk reads / writes so you can see) and use sleep() to make sure and include()s / require()s.

Alix Axel
by default APC will stat the files, which would probably make the lights flash even though the contents aren't being read
Greg