Re: PATCH: allow percentile size of tmpfs (2.5.66 / 2.4.20-pre2)

Christoph Rohland
2003-04-02T17:22:15Z

On Thu, 3 Apr 2003, cat@zip.com.au wrote:
> Sounds like what you want is a dynamically resizing tmpfs based on
> the amount of memory (ram+swap) available. That's a much bigger
> goose to fry I believe.
>
> Now, even if the percentile patch took into account swap, you'd
> still need to remount tmpfs in order to get it to take into account
> of any swap you add on the fly.

No, that's why I said you would need hooks into swapon and
swapoff. Then it would adjust on the fly. Else it's useless from the
usability point of view. With these hooks it's easy to do.

>> could add much saner defaults for /dev/shm or even use it for /tmp.
>
> I use it for /tmp now just fine. :) It's sized at 63% of 256MB of
> RAM.

And I have set it to 400MB on a 256MB box just fine ;-) How could you
do these two setup generally without knowing your hardware. 20MB tmpfs
on a 40MB machine can be a desaster btw.

Greetings
Christoph