Re: RAM Disk
| From: | Camilo Sperberg | Date: | Mon, 22 Oct 2012 08:47:34 +0000 |
| Subject: | Re: RAM Disk | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-319552@lists.php.net to get a copy of this message | ||
On 22 okt. 2012, at 04:45, Alan Hoffmeister <alanhoffmeister@gmail.com> wrote:
> Hello fellows.
> Have anyone already tested PHP inside RAM disk with some Apache/nginx
> accessing those files or even session files?
> It's just for curiosity and performance analysis.
>
> Thanks.
>
>
> --
> --
> Att,
> Alan Hoffmeister
I have not tested it but I think it wouldn't be much difference respecting APC for example,
maybe a tiny little bit faster reading sessions and other file stuff because RAM have really small
access times, but database connections and stuff would still be your main bottleneck (I'm
assuming you do).
I would install APC and set /tmp up into a RAM disc, mainly because not only do MySQL write
temporary files into /tmp (example: if MySQL decides to create a temporary table which would be with
almost any grouping you do), also apache does and, if you haven't setted up the session routes,
sessions will also write itself to /tmp. Plus, if your machine happens to suddenly reboot, you
won't lose any important stuff.
Getting /var/log/ into an SSD or RAM disk should help too, but again: if reliability is important to
you, I wouldn't do that.
Greetings.