You are not logged in.

#1 2012-04-19 18:02:45

Yatmai
Member
Registered: 2008-06-30
Posts: 7

hibernate - some 'stuff' stays in swap after resume

I have problem with hibernating my machine - after resuming, lots of 'stuff' stays in memory and entire OS works soooo sloooow until i force move 'stuff' from swap to memory by swapoff command.

Before hibernation memory stats look like this:

free -m
             total       used       free     shared    buffers     cached
Mem:          3957       1073       2883          0         37        258
-/+ buffers/cache:        777       3179
Swap:         5119          0       5119

And just after resume:

free -m
             total       used       free     shared    buffers     cached
Mem:          3957        640       3316          0          6         79
-/+ buffers/cache:        554       3402
Swap:         5119        278       4841

As you can see, swap use increased and in effect OS works slowly. Swapoff helps, but it almost freezes machine for a while and I don't want to have do this each time.

I use kernel 3.2.8-1-ARCH and I'm hibernating via hibernate -F /etc/hibernate/ususpend-disk.conf command (pm-utils 1.4.1-4, hibernate-script 2.0-7, uswsusp-git 20110711-1). I have also swappiness set to 0.

How can I convince kernel to not leave 'stuff' in swap?

Offline

#2 2012-04-22 20:32:58

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: hibernate - some 'stuff' stays in swap after resume

Does it persist? I noticed that mine has a small amount of swap usage right after resume but after a little while, memory usage is back to normal with no swap usage. Or does this happen but not quickly enough?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2012-04-27 07:05:10

Yatmai
Member
Registered: 2008-06-30
Posts: 7

Re: hibernate - some 'stuff' stays in swap after resume

Unfortunately problem persist

Offline

#4 2012-04-29 15:12:47

Bkmz
Member
Registered: 2011-07-30
Posts: 21

Re: hibernate - some 'stuff' stays in swap after resume

Hi guys, sorry, but maybe it helps smile
Now i'm using Gentoo, but have similar issue.

Linux bkmz-hp-laptop 3.3.3-gentoo #1 SMP PREEMPT Sat Apr 28 00:45:55 KRAT 2012 x86_64 Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz GenuineIntel GNU/Linux

And this issue was in 3.3.0 also.
So, after resume my LED of HDD activity remain on for 1-5 minuites. When it out of freeze free -m gives me terrible situation.

total       used       free     shared    buffers     cached
Mem:          7919       3908       4011          0         18        594
-/+ buffers/cache:       3295       4624
Swap:         9688       2491       7197

So, i need to run swapoff -a to reanimate my laptop, because with 2.5Gb of cache it can't be used.

Some interesting thing, when I hibernating with uptime less 1 hour or more, it's resume immediate.
PS I have 0.5-1Gb /dev/shm full with chromium cache, and only 3 module from VBox loaded:

lsmod      
Module                  Size  Used by
vboxnetadp              4998  0 
vboxnetflt             15117  0 
vboxdrv              1779964  2 vboxnetflt,vboxnetadp

Now, my uptime is near 1 day. I'll try to hibernate with 4Gb loaded staf in RAM: Chromium, Skype, Sublime text 2. and provide some data from my dmesg...

Offline

#5 2012-04-29 15:18:46

Bkmz
Member
Registered: 2011-07-30
Posts: 21

Re: hibernate - some 'stuff' stays in swap after resume

This i give after hibernation, and freezing after resume swap image was fast - near 2-3 min.
http://pastebin.com/1Fn1Bru6
Now, i'm try to remove all stuff from memory and repeat hibernation steps

Added:
I found, that chromium gives us swap after resume. but what i can't understand

Last edited by Bkmz (2012-04-29 15:30:13)

Offline

#6 2012-05-01 11:02:38

Yatmai
Member
Registered: 2008-06-30
Posts: 7

Re: hibernate - some 'stuff' stays in swap after resume

Not only Chromium causes problem - Firefox and JBoss also. Generally each program which allocates more than 100+MB of RAM results in swap usage after resume.

Offline

Board footer

Powered by FluxBB