Discussion:
Hibertation/Resume speed very different on two similar laptops
Fred Boiteux
2014-03-26 18:24:54 UTC
Permalink
Hello,

I use TuxOnIce system for a long time now, it rocks, thanks for that !
I use it on 2 laptops with Debian Wheezy system, 3.2 Linux kernel with
tuxonice-for-linux-3.2.54-2014-01-19.patch.bz2 patch. I noticed that on
one laptop, the hibernation and resume take a lot more time than on
another, which should be a little less powerful ?! I checked the logs
from TuxOnIce system :

- on the faster laptop :
[185359.124757] TuxOnIce debugging info:
[185359.124758] - TuxOnIce core : 3.3
[185359.124759] - Kernel Version : 3.2-hp-toi
[185359.124760] - Compiler vers. : 4.7
[185359.124760] - Attempt number : 6
[185359.124761] - Parameters : 0 667656 0 1 -2 0
[185359.124762] - Overall expected compression percentage: 0.
[185359.124763] - Compressor is 'lzo'.
[185359.124764] Compressed 1964077056 bytes into 521591459 (73
percent compression). [185359.124765] - Block I/O active.
[185359.124766] Used 129257 pages from swap on /dev/sda2.
[185359.124767] - Max outstanding reads 2073. Max writes 1980.
[185359.124768] Memory_needed: 1024 x (4096 + 368 + 112) = 4685824
bytes. [185359.124769] Free mem throttle point reached 0.
[185359.124770] - Swap Allocator enabled.
[185359.124771] Swap available for image: 962026 pages.
[185359.124772] - File Allocator active.
[185359.124773] Storage available for image: 0 pages.
[185359.124774] - I/O speed: Write 165 MB/s, Read 287 MB/s.
[185359.124774] - Extra pages : 633 used/2000.
[185359.124775] - Result : Succeeded.

- on the slower one :
[255215.537021] - TuxOnIce core : 3.3
[255215.537022] - Kernel Version : 3.2-x201-toi
[255215.537022] - Compiler vers. : 4.7
[255215.537023] - Attempt number : 58
[255215.537023] - Parameters : 0 667656 0 1 -2 0
[255215.537024] - Overall expected compression percentage: 0.
[255215.537025] - Compressor is 'lzo'.
[255215.537026] Compressed 2768871424 bytes into 888111772 (67
percent compression) .
[255215.537027] - Block I/O active.
[255215.537027] Used 219534 pages from swap on /dev/sda2.
[255215.537028] - Max outstanding reads 1575. Max writes 1701.
[255215.537029] Memory_needed: 1024 x (4096 + 368 + 112) = 4685824
bytes. [255215.537030] Free mem throttle point reached 0.
[255215.537031] - Swap Allocator enabled.
[255215.537031] Swap available for image: 876649 pages.
[255215.537032] - File Allocator active.
[255215.537033] Storage available for image: 0 pages.
[255215.537033] - I/O speed: Write 77 MB/s, Read 231 MB/s.
[255215.537034] - Extra pages : 0 used/2000.
[255215.537035] - Result : Succeeded.


What can explain a so big difference between 165 MB/s and 77 MB/s, on
similar hardware ?

Fred.
Nigel Cunningham
2014-03-28 20:55:27 UTC
Permalink
Hi Fred.

What type of drives are they? If they're rotating media (as I guess they
are from those speeds), where is the swap partition located on each?

Also, do they both have the same number of processors/cores, running at
the same speeds?

TuxOnIce has a couple of test parameters you can set (in
/sys/power/tuxonice) that will cause it to do things like just to test
compressing the image without writing it. They should help narrow down
the issue.

Regards,

Nigel
Post by Fred Boiteux
Hello,
I use TuxOnIce system for a long time now, it rocks, thanks for that !
I use it on 2 laptops with Debian Wheezy system, 3.2 Linux kernel with
tuxonice-for-linux-3.2.54-2014-01-19.patch.bz2 patch. I noticed that on
one laptop, the hibernation and resume take a lot more time than on
another, which should be a little less powerful ?! I checked the logs
[185359.124758] - TuxOnIce core : 3.3
[185359.124759] - Kernel Version : 3.2-hp-toi
[185359.124760] - Compiler vers. : 4.7
[185359.124760] - Attempt number : 6
[185359.124761] - Parameters : 0 667656 0 1 -2 0
[185359.124762] - Overall expected compression percentage: 0.
[185359.124763] - Compressor is 'lzo'.
[185359.124764] Compressed 1964077056 bytes into 521591459 (73
percent compression). [185359.124765] - Block I/O active.
[185359.124766] Used 129257 pages from swap on /dev/sda2.
[185359.124767] - Max outstanding reads 2073. Max writes 1980.
[185359.124768] Memory_needed: 1024 x (4096 + 368 + 112) = 4685824
bytes. [185359.124769] Free mem throttle point reached 0.
[185359.124770] - Swap Allocator enabled.
[185359.124771] Swap available for image: 962026 pages.
[185359.124772] - File Allocator active.
[185359.124773] Storage available for image: 0 pages.
[185359.124774] - I/O speed: Write 165 MB/s, Read 287 MB/s.
[185359.124774] - Extra pages : 633 used/2000.
[185359.124775] - Result : Succeeded.
[255215.537021] - TuxOnIce core : 3.3
[255215.537022] - Kernel Version : 3.2-x201-toi
[255215.537022] - Compiler vers. : 4.7
[255215.537023] - Attempt number : 58
[255215.537023] - Parameters : 0 667656 0 1 -2 0
[255215.537024] - Overall expected compression percentage: 0.
[255215.537025] - Compressor is 'lzo'.
[255215.537026] Compressed 2768871424 bytes into 888111772 (67
percent compression) .
[255215.537027] - Block I/O active.
[255215.537027] Used 219534 pages from swap on /dev/sda2.
[255215.537028] - Max outstanding reads 1575. Max writes 1701.
[255215.537029] Memory_needed: 1024 x (4096 + 368 + 112) = 4685824
bytes. [255215.537030] Free mem throttle point reached 0.
[255215.537031] - Swap Allocator enabled.
[255215.537031] Swap available for image: 876649 pages.
[255215.537032] - File Allocator active.
[255215.537033] Storage available for image: 0 pages.
[255215.537033] - I/O speed: Write 77 MB/s, Read 231 MB/s.
[255215.537034] - Extra pages : 0 used/2000.
[255215.537035] - Result : Succeeded.
What can explain a so big difference between 165 MB/s and 77 MB/s, on
similar hardware ?
Fred.
_______________________________________________
TuxOnIce-users mailing list
http://lists.tuxonice.net/listinfo/tuxonice-users
Fred Boiteux
2014-03-31 19:40:04 UTC
Permalink
Hi Nigel,

Thanks for your answer.
Post by Nigel Cunningham
What type of drives are they? If they're rotating media (as I guess
they are from those speeds), where is the swap partition located on
each?
Yes, both are classical SATA hard drives. I lately noticed that the
slower (WDC WD5000BUCT-63LS5Y1) is a 5400 RPM one, the faster (Hitachi
HTS723216L9A360) a 7200 RPM : perhaps it's a sufficient explanation.
Testing read speed with « hdparm -tT /dev/sda » gave similar results,
with the former lightly quickier than the latter... But when
hibernating, it's about writing, not reading, perhaps it changes
results !
The swap partition are roughly at the same place on the 2 disks (2nd
partition, about 4Go from the beginning...)
Post by Nigel Cunningham
Also, do they both have the same number of processors/cores, running
at the same speeds?
TuxOnIce has a couple of test parameters you can set (in
/sys/power/tuxonice) that will cause it to do things like just to
test compressing the image without writing it. They should help
narrow down the issue.
Can you tell me how to test it ? I poke around in this directory, but
didn't find how to do a good test.

Thanks,
Fred.
Nigel Cunningham
2014-04-01 07:32:26 UTC
Permalink
Hi.
Post by Fred Boiteux
Hi Nigel,
Thanks for your answer.
Post by Nigel Cunningham
What type of drives are they? If they're rotating media (as I guess
they are from those speeds), where is the swap partition located on
each?
Yes, both are classical SATA hard drives. I lately noticed that the
slower (WDC WD5000BUCT-63LS5Y1) is a 5400 RPM one, the faster (Hitachi
HTS723216L9A360) a 7200 RPM : perhaps it's a sufficient explanation.
Testing read speed with « hdparm -tT /dev/sda » gave similar results,
with the former lightly quickier than the latter... But when
hibernating, it's about writing, not reading, perhaps it changes
results !
To test the write speed, I'd swapoff the partition, then try dd
if=/dev/zero of=/dev/partition (be careful not to do the /dev file for
the whole drive!), then mkswap it again. If your /etc/fstab specifies
the partition by UUID, you can use -U to mkswap to restore the UUID.
Post by Fred Boiteux
The swap partition are roughly at the same place on the 2 disks (2nd
partition, about 4Go from the beginning...)
Post by Nigel Cunningham
Also, do they both have the same number of processors/cores, running
at the same speeds?
Hmm. That sounds like the opposite of what we'd expect, right?
Post by Fred Boiteux
Post by Nigel Cunningham
TuxOnIce has a couple of test parameters you can set (in
/sys/power/tuxonice) that will cause it to do things like just to
test compressing the image without writing it. They should help
narrow down the issue.
Can you tell me how to test it ? I poke around in this directory, but
didn't find how to do a good test.
Sure. It's been a while since I used them, so I needed to give myself a
refresher :)

In /sys/power/tuxonice, there's a file called test_filter_speed. If you
set it to 1, then run hibernation like normal, the system will do all
the compression it would do if it was really writing the image, but will
just discard the compressed data instead of writing it. It will also not
do the atomic copy. So at the end of the 'cycle', you'll get a write
speed in the log that reflects the maximum speed that computer was
capable of doing. If this is the problem for you, that number should be
about the same as what you normally see when writing a real image.

After trying this, reset test_filter_speed to 0, then set
/sys/power/tuxonice/compression/enabled = 0 and try a cycle. This will
really hibernate, but without compressing the image. In this mode, you
should get the maximum throughput the system can achieve writing to the
swap, which should be about the same as the dd you did above.

Regards,

Nigel

Loading...