
On Sun, Feb 12, 2012 at 01:33:34PM +1100, Andrew Worsley wrote:
I'm reluctant to repeat this again but it appeared that under a squeeze version of PPC Linux Linux imac 2.6.32-5-powerpc on a machine that had 512Mb of ram I ran:
dd if=/dev/zero of=empty.dat bs=1024M count=66
that's 66GB in 1GB chunks, so all sorts of things will go wrong with that on a machine with 512MB of ram.
Then it swelled so that it''s RES become around 900+Mb and I couldn't kill it.
as it should - it should swell to 1024MB. you told it to. this is no different to allocating 1GB of ram on a 512MB machine. it's not something you want to do, nor is it something that the kernel's going to stop you doing, but it's not going to run fast.
I tried by ^C, ^Z on the spawning terminal
when the current 1GB of i/o has made it to disk(*) then the process would have got the signal and died. until then the process is in D state and unkillable whilst the kernel is writing what its been told to write. this is normal. if you want the dd to be killable in less time than it takes to write 512MB (all your ram) of buffered i/o to disk, then use direct i/o. eg. bs=10M oflag=direct cheers, robin (*) will take a long time if your machine's swap partition is on the same disk as the disk you are writing to.