You are not logged in.

#1 2021-01-17 18:35:19

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,087

hibernation: uswsusp vs swsusp speed

Today i compared the speed of uswsusp versus plain kernel hibernation and found that uswsusp is way faster than the "native" method.
Both are set to reboot instead of shutdown and the wanted image size is 3GB for both methods ; uswsusp is set to not use threads when compressing.

root@slimer# date ; echo disk > /sys/power/state ; date
dom 17 gen 2021, 19:19:55, CET
dom 17 gen 2021, 19:20:56, CET

root@slimer# date ; s2disk ; date
dom 17 gen 2021, 19:19:03, CET
dom 17 gen 2021, 19:19:42, CET

uswsusp completed in 39 seconds, while kernel alone completed in about 60 seconds.
The resume speed is more or less the same, about 16 seconds, this means the kernel is hibernating in 44 seconds versus 23 seconds of uswsusp.

As far as in understood kernel is compressing the image via LZO by default (https://www.kernel.org/doc/Documentatio … swsusp.txt) and LZO compression is used by uswsusp as well.

This is the kernel log after each method:

s2disk:

[ 3981.108816] PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
[ 3981.108817] PM: hibernation: Marking nosave pages: [mem 0x0009d000-0x000fffff]
[ 3981.108819] PM: hibernation: Marking nosave pages: [mem 0x9d79e000-0x9d7a4fff]
[ 3981.108819] PM: hibernation: Marking nosave pages: [mem 0x9dc05000-0x9e04dfff]
[ 3981.108832] PM: hibernation: Marking nosave pages: [mem 0xbcbed000-0xbdffefff]
[ 3981.108890] PM: hibernation: Marking nosave pages: [mem 0xbe000000-0xffffffff]
[ 3981.109457] PM: hibernation: Basic memory bitmaps created
[ 3981.109479] PM: hibernation: Preallocating image memory
[ 3981.574126] PM: hibernation: Allocated 673722 pages for snapshot
[ 3981.574128] PM: hibernation: Allocated 2694888 kbytes in 0.46 seconds (5858.45 MB/s)
[ 3989.069973] PM: hibernation: Creating image:
[ 3989.846283] PM: hibernation: Need to copy 672727 pages
[ 3989.846288] PM: hibernation: Normal pages needed: 672727 + 1024, available pages: 3440718
[ 3989.943915] PM: hibernation: free pages cleared after restore
[ 3994.800965] PM: hibernation: Basic memory bitmaps freed

kernel:

[ 4024.815268] PM: hibernation: hibernation entry
[ 4024.831814] PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
[ 4024.831815] PM: hibernation: Marking nosave pages: [mem 0x0009d000-0x000fffff]
[ 4024.831817] PM: hibernation: Marking nosave pages: [mem 0x9d79e000-0x9d7a4fff]
[ 4024.831817] PM: hibernation: Marking nosave pages: [mem 0x9dc05000-0x9e04dfff]
[ 4024.831830] PM: hibernation: Marking nosave pages: [mem 0xbcbed000-0xbdffefff]
[ 4024.831887] PM: hibernation: Marking nosave pages: [mem 0xbe000000-0xffffffff]
[ 4024.832454] PM: hibernation: Basic memory bitmaps created
[ 4024.832455] PM: hibernation: Preallocating image memory
[ 4025.227414] PM: hibernation: Allocated 672733 pages for snapshot
[ 4025.227416] PM: hibernation: Allocated 2690932 kbytes in 0.39 seconds (6899.82 MB/s)
[ 4033.192771] PM: hibernation: Creating image:
[ 4033.969417] PM: hibernation: Need to copy 671927 pages
[ 4033.969423] PM: hibernation: Normal pages needed: 671927 + 1024, available pages: 3441511
[ 4034.059563] PM: hibernation: free pages cleared after restore
[ 4039.101962] PM: hibernation: Basic memory bitmaps freed
[ 4039.104961] PM: hibernation: hibernation exit

Does anybody have an explaination?


Help me to improve ssh-rdp !

Offline

Board footer

Powered by FluxBB