Hi internals,
sorry if it is a wrong lists for this question.
I have read many articles/messages about using tmpfs store temp files,
for example, php session data, smarty compied templates and so on.
An obvious reason for that is: it doesn't matter about data loss caused by
machine restart/poweroff.
since it is not that difficult to restore files on a tmpfs from a disk-based
dir when machine boot up.
so may i put all my php scripts on a tmpfs to speed it up? would that cause
other issues?
thanks for your advices.
Hi,
2009/8/10 Peter Wang ptr.wang@gmail.com:
Hi internals,
sorry if it is a wrong lists for this question.
Indeed, this should be asked on php-general.
I have read many articles/messages about using tmpfs store temp files,
for example, php session data, smarty compied templates and so on.
An obvious reason for that is: it doesn't matter about data loss caused by
machine restart/poweroff.since it is not that difficult to restore files on a tmpfs from a disk-based
dir when machine boot up.so may i put all my php scripts on a tmpfs to speed it up? would that cause
other issues?
Don't do this, Linux/Unix already cache files in memory (-> grep
^Cached /proc/meminfo).
If you want to speed up your PHP app, consider APC.
thanks for your advices.
--
Patrick Allaert
http://code.google.com/p/peclapm/ - Alternative PHP Monitor
Patrick ALLAERT wrote:
Don't do this, Linux/Unix already cache files in memory (-> grep
^Cached /proc/meminfo).
If you want to speed up your PHP app, consider APC.
+1 vote for APC. The performance improvement on my website was dramatic,
I had to check the results several times before I believed it. We were a
heavily overloaded server whose load average was 50 at peak times. A
quick "apt-get install php-apc" reduced that load to 5.0, with just a
32MB opcode cache.
Cheers,
Nicholas Sherlock