[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Idea: mount /tmp to tmpfs depending on free space and RAM

On Sat, Jun 02, 2012 at 05:11:16PM +0300, Serge wrote:
> 2012/6/2 Toni Mueller wrote:
> > Eg. web application's session data very frequently goes there, and/or
> > the sysadmin wants it to go onto a tmpfs.
> First, there can be rather large session directory, you probably don't
> want ~365595 files to be always eating your RAM.

Well, I much rather want that, or store the session data in memcache,
which is almost the same thing, only with a different label. Mind you,
all these things are done to *prevent* the application from going to
disk, and force it to stay in RAM. And that's exactly what I want.

> Second, session data MUST NOT be lost on reboot by default.

Why not? I could not care less for the loss of session data every once
in a while. People will log in again if their CMS backends really logged
them out because of that, if anything, but session data is created for
about every visitor, or spider, that hits the site(s), and will be
forcefully cleaned up by cron-jobs, anyway. Not my code, so blame
someone else.

> So even without /tmp, sysadmin should not put session data on tmpfs.

I am unconvinced. You can store your session data wherever you like, but
I prefer RAM.

> There're different admins, however...

Yes, looks like it.

> No need to. You only need to add -pipe to your *FLAGS. You don't build
> software with default autotools flags (-g -O2) anyway, I guess.

Well, usually I do, except that I usually only compile C & friends, not
write it.

Kind regards,

Reply to: