Gentoo Archives: gentoo-user

From: Florian Philipp <lists@×××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] swap on ssd?
Date: Mon, 26 Nov 2012 08:18:59
Message-Id: 50B32590.4060502@binarywings.net
In Reply to: [gentoo-user] swap on ssd? by William Kenworthy
1 Am 25.11.2012 23:46, schrieb William Kenworthy:
2 > Has anyone tried swap on ssd? - has it killed the drive prematurely? -
3 > any other effects?
4 >
5 > I have a system that is maxed with with 4G ram and tends to use swap
6 > heavily at times which slows things down ... so I am thinking a small
7 > ssd might help here.
8 >
9
10 You should tell us which model you want to use. In any case, if it is
11 relatively recent, I don't think you can actually break it with write
12 cycles anymore unless you keep it 100% busy 24/7.
13
14 > Another slower alternative is a usb thumbdrive ... might try that later
15 > today as I have some around ... again anyone tried this and found
16 > something unexpected?
17 >
18
19 Thumbdrives have much simpler wear leveling. They also use triple level
20 cells (TLC) which are even worse than the MLCs found in cheaper SSDs.
21 Not to forget that USB doesn't support proper DMA and therefore
22 increases CPU load. Long story short: Swapping on thumbdrives is as fast
23 as a snail riding a turtle -- but turtles have a longer life span.
24
25 Another idea:
26 You can try to reduce the swap load by using frontswap with zcache. It
27 compresses memory pages in RAM which would otherwise be swapped. You
28 still need swap but less often.
29
30 Enable
31 FRONTSWAP
32 CRYPTO
33 CONFIG_STAGING
34 CONFIG_ZCACHE
35
36 then add "zcache" to your boot parameters.
37
38 Regards,
39 Florian Philipp

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] swap on ssd? William Kenworthy <billk@×××××××××.au>