You are here: Re: php file loading performance « PHP Programming Language « IT news, forums, messages
Re: php file loading performance

Posted by _q_u_a_m_i_s's on 01/30/08 15:30

On Jan 30, 1:08 pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.org> wrote:
> Blitzen wrote:
> > Does the sapi/cgi php have an option to keep all the php files it's called
> > in its memory space and never touch the disk or call open( ) again?
>
> Why bother? The OS will have that file cached to memory...
>
> --
> ----------------------------------
> Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
>
> "The difference between pornography and erotica is lighting."
> - Gloria Leonard

You may mount the apc temp path to a ramdisk(so the files will really
be in memory).
I dont know how apc is implemented, but most probably it will only
"intercept" opened files, but it will not disable the fopen() from php
with his own filehandlers. You may ask a question on the apc forum...
but it would be kinda dificult(read: needs lots of hacking, prone to
future bugs) to replace the fopen from php with an internal open from
the apc...

If you need fast file acceses, then disable atime when mounting the
partition with the php & apc cache scripts, and put them in a
ramdisk . I do belive that moving the apc cache to a ramdisk would be
enough, as it should check if a file had changed by only checking
filemtime(modify time).

Also pay attention to the used filesystem. from what i remember ext3
was faster for big files, while reiserfs was faster for smaller
files(this should be the case for the cache & php files). The only way
to reliable determine this is to test it yourself, there are many
flame wars started from benchmarking the file systems, with no real
conclusion in my opinion.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация