Gentoo Archives: gentoo-user

From: Paul Hartman <paul.hartman+gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Swap performance
Date: Wed, 25 May 2011 19:37:15
Message-Id: BANLkTim6W2JCLcpB3jq4WkdVJUrr6TFpeA@mail.gmail.com
In Reply to: Re: [gentoo-user] Swap performance by Volker Armin Hemmann
1 On Wed, May 25, 2011 at 11:58 AM, Volker Armin Hemmann
2 <volkerarmin@××××××××××.com> wrote:
3 > On Wednesday 25 May 2011 10:31:19 Paul Hartman wrote:
4 >
5 >> When I move the swap to a slow SD card instead (2MB/sec transfer
6 >> rate), even in that slow device, swapoff on the eMMC swap partition
7 >> with ~500M in-use takes about 2 or 3 minutes at most with the data
8 >> being swapped slowly into the SD card.
9 >>
10 >> So I think in your case it should be much faster than that!
11 >
12 > you are comparing apples with oranges (harddisks with moving arms with solid
13 > state devices).
14 >
15 > Do yourself a favour. Look up how long a harddisk needs to position its head.
16
17 Yeah, measuring speed in microseconds versus milliseconds. :)
18
19 My SD read/write speed is about 0.9MB/sec in benchmark, and about 2
20 MB/sec in real-life swap usage. Based on Alex's timings it seems his
21 HDD is getting about 0.5 MB/sec in swap usage. HDD benchmark random
22 read/write is usually faster than that. But probably you're right and
23 the seek operations are really killing it. HDD is about 20 times
24 slower than SD card in seeking.
25
26 If he has a USB flash drive, or memory card reader, he can use it for
27 swap and see if it's any better or worse. I am curious how it will
28 compare.
29
30 Or, if he has multiple disks, he could create more swap partitions
31 with equal priority and kernel will stripe/load balance automatically,
32 hopefully improving his swap performance.
33
34 Or better yet, figure out why his system is swapping at all which is
35 what he was going for I think. With 8 GB I think he should be able to
36 disable swap entirely anyway. :)