
Has anyone seen this before? I'm pretty sure I know what it is :-) How I did it: Select ~4,000 image files in file manager (to delete) - but with 'Show As Thumbnail' selected - managed to kill an E6300 (Dual-Core 1.86GHz w/2GB RAM and 2GB SWAP). Questions: ========== a) Is this a case of the kernel running out of physical AND virtual memory? b) I have a SWAP file size of " cat /proc/swaps Filename Type Size Used Priority /dev/sdb2 partition 3903784 0 -1 " Should be ~4GB - but 'top' was only showing 2GB in-use/useable - should I have split the 4GB into 2x 2GB SWAP partitions for GNU/Linux to utilise it all? c) Can anyone explain in nice laymans terms the correct use of the 'Alt + SysReq' and 'Alt + S' and 'Alt + U' and 'Alt + B' key sequence (I used this to (I think) tell the machine to safely shut down). Cheers, Elroy.
[ 5756.653718] passkey-agent invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=0 [ 5756.653741] [<c015a915>] out_of_memory+0x175/0x1b0 [ 5756.653759] [<c015c364>] __alloc_pages+0x2e4/0x340 [ 5756.653770] [<c015db69>] __do_page_cache_readahead+0x109/0x250 [ 5756.653781] [<c02ed622>] io_schedule+0x22/0x30 [ 5756.653787] [<c02ed8cb>] __wait_on_bit_lock+0x5b/0x70 [ 5756.653790] [<c01570d0>] sync_page+0x0/0x40 [ 5756.653799] [<c01570b3>] __lock_page+0x73/0x80 [ 5756.653809] [<c0159b13>] filemap_nopage+0x2c3/0x3a0 [ 5756.653820] [<c01643ea>] __handle_mm_fault+0x14a/0xa40 [ 5756.653825] [<c0102236>] __switch_to+0xc6/0x1f0 [ 5756.653842] [<c02f0658>] do_page_fault+0x128/0x600 [ 5756.653854] [<c02f0530>] do_page_fault+0x0/0x600 [ 5756.653859] [<c02eed0c>] error_code+0x7c/0x90 [ 5756.653872] ======================= [ 5756.653873] Mem-info: [ 5756.653875] DMA per-cpu: [ 5756.653877] CPU 0: Hot: hi: 0, btch: 1 usd: 0 Cold: hi: 0, btch: 1 usd: 0 [ 5756.653880] CPU 1: Hot: hi: 0, btch: 1 usd: 0 Cold: hi: 0, btch: 1 usd: 0 [ 5756.653882] Normal per-cpu: [ 5756.653884] CPU 0: Hot: hi: 186, btch: 31 usd: 38 Cold: hi: 62, btch: 15 usd: 60 [ 5756.653887] CPU 1: Hot: hi: 186, btch: 31 usd: 59 Cold: hi: 62, btch: 15 usd: 61 [ 5756.653888] HighMem per-cpu: [ 5756.653890] CPU 0: Hot: hi: 186, btch: 31 usd: 143 Cold: hi: 62, btch: 15 usd: 45 [ 5756.653893] CPU 1: Hot: hi: 186, btch: 31 usd: 121 Cold: hi: 62, btch: 15 usd: 23 [ 5756.653897] Active:247244 inactive:246390 dirty:0 writeback:0 unstable:0 free:12228 slab:5093 mapped:650 pagetables:2205 [ 5756.653901] DMA free:8128kB min:68kB low:84kB high:100kB active:600kB inactive:708kB present:16256kB pages_scanned:2015 all_unreclaimable? yes [ 5756.653903] lowmem_reserve[]: 0 873 2015 [ 5756.653908] Normal free:40296kB min:3744kB low:4680kB high:5616kB active:408760kB inactive:407108kB present:894080kB pages_scanned:1419965 all_unreclaimable? yes [ 5756.653911] lowmem_reserve[]: 0 0 9139 [ 5756.653915] HighMem free:488kB min:512kB low:1736kB high:2960kB active:579616kB inactive:577744kB present:1169800kB pages_scanned:1908817 all_unreclaimable? yes [ 5756.653918] lowmem_reserve[]: 0 0 0 [ 5756.653920] DMA: 2*4kB 49*8kB 61*16kB 29*32kB 13*64kB 5*128kB 5*256kB 0*512kB 1*1024kB 1*2048kB 0*4096kB = 8128kB [ 5756.653928] Normal: 32*4kB 23*8kB 13*16kB 17*32kB 91*64kB 5*128kB 2*256kB 7*512kB 14*1024kB 5*2048kB 1*4096kB = 40296kB [ 5756.653936] HighMem: 8*4kB 9*8kB 0*16kB 0*32kB 0*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 488kB [ 5756.653945] Swap cache: add 1476597, delete 1476597, find 120489/168440, race 4+39 [ 5756.653947] Free swap = 0kB [ 5756.653948] Total swap = 3903784kB [ 5756.653950] Free swap: 0kB [ 5756.658573] 524128 pages of RAM [ 5756.658575] 294752 pages of HIGHMEM [ 5756.658576] 5910 reserved pages [ 5756.658577] 3523 pages shared [ 5756.658579] 0 pages swap cached [ 5756.658580] 0 pages dirty [ 5756.658581] 0 pages writeback [ 5756.658582] 650 pages mapped [ 5756.658584] 5093 pages slab [ 5756.658585] 2205 pages pagetables

Select ~4,000 image files in file manager (to delete) - but with 'Show As Thumbnail' selected - managed to kill an E6300 (Dual-Core 1.86GHz w/2GB RAM and 2GB SWAP).
<snip>
Should be ~4GB - but 'top' was only showing 2GB in-use/useable - should I have split the 4GB into 2x 2GB SWAP partitions for GNU/Linux to utilise it all?
In general, I'd say this much swap is not a good thing. Even 2 GB of swap will give you problems, realistically. If you ever get to the point where you are actively using that much ram and are paging out to 2GB or 4 GB of swap, your system will probably be useless anyway, due to heavy paging to disk. Far better to let the oom-killer take effect earlier in the process. There used to be rules like "The kernel needs twice as much swap as ram", but they only applied for early 2.4 kernels, and they certainly don't apply any more, despite often being quoted as current. It's not even really a good guideline these days, because systems with lots of ram are so common. Between 512 MB and a gig of swap is probably good - this will mean any applications which aren't being used at all can be paged out of active ram, freeing up the ram they were using for actual use, and it gives you a good tradeoff as processes that run amok, using up lots of ram, get killed that much quicker.
c) Can anyone explain in nice laymans terms the correct use of the 'Alt + SysReq' and 'Alt + S' and 'Alt + U' and 'Alt + B' key sequence (I used this to (I think) tell the machine to safely shut down).
I'm picking you needed to use this because the system was so unresponsive... and that was probably because it was spending most of time pushing things in and out of swap. However, the oom-killer doesn't kill the system, or the kernel. It'll kill processes that try to request memory when there is no more left - which is why it killed the process "passkey-agent" in your pasted log snippet. As I suspect all of your processes were running under your X session, you could have killed X instead (via ctrl-alt-backspace, for example). This may not have left your system in a usable state, due to other processes having been killed, but it would have been safe to reboot it normally from here.

Thanks for the replies.
In general, I'd say this much swap is not a good thing.
Even if I do dumb things like this, as well as playing with 20MB+ images regularly? I have 3x HDD - would 3x SWAP partitions of ~350MB spread over each one be more efficient?
Even 2 GB of swap will give you problems, realistically. If you ever get to the point where you are actively using that much ram and are paging out to 2GB or 4 GB of swap, your system will probably be useless anyway, due to heavy paging to disk.
The system was actually pretty responsive still - as far as being able to browse the web/check email, etc. goes - eventually when it started to slow down switching between virtual desktops I tried the Ctrl-Alt-Backspace sequence, but this appeared to do nothing, so used (at this point I had a blank screen) the SysReq function.
Far better to let the oom-killer take effect earlier in the process.
I'm picking you needed to use this because the system was so unresponsive... and that was probably because it was spending most of time pushing things in and out of swap.
However, the oom-killer doesn't kill the system, or the kernel. It'll kill processes that try to request memory when there is no more left - which is why it killed the process "passkey-agent" in your pasted log snippet. As I suspect all of your processes were running under your X session, you could have killed X instead (via ctrl-alt-backspace, for example). This may not have left your system in a usable state, due to other processes having been killed, but it would have been safe to reboot it normally from here.
As mentioned before, apart from pretty heavy swapping (the SWAP partition was on a 36GB Raptor HDD, so this may have helped the performance a bit) the system was pretty useable for an hour or so after this had started :-) Thanks for the replies - they have increased my understanding a little more! Cheers, Elroy.

On 27/10/2007, elroy <elroy(a)ihug.co.nz> wrote:
c) Can anyone explain in nice laymans terms the correct use of the 'Alt + SysReq' and 'Alt + S' and 'Alt + U' and 'Alt + B' key sequence (I used this to (I think) tell the machine to safely shut down).
Alt-SysReq gets you a minimal interaction with the kernel when the userspace of the machine has gone bye-bye for whatever reason (fork-bomb, swapping madly, etc). The three commands you mention above are: S - Sync disk, flushes all disk buffers so all pending writes hit the disk surface. U - remounts all file systems read-only to prevent further modifications B - Reboot It's basically a safer way of forcefully rebooting the machine than just hitting the reset button as you're at least giving the disks a reasonable chance to get it sync and cleanly unmounted before you restart. You can also use 'e' and 'i' before the s-u-b sequence to send SIGTERM and SIGKILL to all processes to give them a chance to clean-up nicely first too. -- Matt Brown matt(a)mattb.net.nz Mob +353 86 608 7117 www.mattb.net.nz
participants (3)
-
Daniel Lawson
-
elroy
-
Matt Brown