2001-02-26 21:09:19

by Norbert Nemec

[permalink] [raw]
Subject: PROBLEM: ramfs causes system hang when swapping

Hi,

seems like ramfs lets the system hang when swapping is involved.

I have a ramfs mounted as /tmp. When I create a large file:

dd if=/dev/zero of=/tmp/xxx bs=1024K count=200

(with 128M RAM), the complete system comes to a halt. Hitting keys does not do
anything anymore, console switching still works, but all other processes come
to a halt as well. SysRq still works and by doing a 'saK', I can kill the dd
process - afterwards, everything is fine again.

Same thing anytime I write large amounts of data to the ramfs.

Now today I even had that problem without writing anything to /tmp: running a
compilation that creates one process sized ~100M, suddenly everything froze the
same way as described above. Later a unmounted the ramfs and everything worked
fine.

B.t.w.: Apart from this bug, ramfs really is a great thing. Mounting it to /tmp
speeds up a number of tasks significantly! (p.e. browsing into archives with
mc, which uses temporary files heavily.) IMO, that method should be propagated
much more!

Ciao,
Nobbi

--
-- ______________________________________________________
-- JESUS CHRIST IS LORD!
-- To Him, even that machine here has to obey...
--
-- _________________________________Norbert "Nobbi" Nemec
-- Hindenburgstr. 44 ... D-91054 Erlangen ... Germany
-- eMail: <[email protected]> Tel: +49-(0)-9131-204180


2001-02-26 21:16:21

by Alan

[permalink] [raw]
Subject: Re: PROBLEM: ramfs causes system hang when swapping

> I have a ramfs mounted as /tmp. When I create a large file:
>
> dd if=/dev/zero of=/tmp/xxx bs=1024K count=200
>
> (with 128M RAM), the complete system comes to a halt. Hitting keys does not do

RAMfs doesnt use swap. It also in 2.4.2 doesnt have limits. The -ac one uses
limits so will stop you totally running the box out of ram. 2.4ac also has
the true tmpfs with swap backing

2001-02-26 21:44:42

by Nicolas Pitre

[permalink] [raw]
Subject: Re: PROBLEM: ramfs causes system hang when swapping



On Mon, 26 Feb 2001, Alan Cox wrote:

> RAMfs doesnt use swap. It also in 2.4.2 doesnt have limits. The -ac one uses
> limits so will stop you totally running the box out of ram. 2.4ac also has
> the true tmpfs with swap backing

Which one of those should be the best to use when there is no swap?


Nicolas