Gentoo Archives: gentoo-user

From: William Kenworthy <billk@×××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] more on SSD: swap
Date: Sun, 21 Jul 2013 22:19:31
In Reply to: [gentoo-user] more on SSD: swap by luis jure
1 On 21/07/13 22:31, luis jure wrote:
2 >
3 > OK, now i have my system successfully installed and running on my new SSD.
4 > now i have to decide what to do with the rest of the disk (it's a 256MB
5 > samsung).
6 >
7 > the first big question is: what about swap? i found some web pages
8 > (perhaps old) stating that it's not wise to put swap on the SSD because of
9 > all the read/writes. but apparently from what i read on the recent
10 > thread on this list, that shouldn't be much of a concern now.
11 >
12 > i also read somewhere that if you have swap on the SSD and want to avoid
13 > unnecessary read/writes, you can reduce swappiness. i have 12GB RAM and i
14 > think normally i don't really need swap space on disk, so i thought that
15 > could be a good idea.
16 >
17 > so what i'm planning to do now is:
18 >
19 > - put swap on the SSD
20 > - reduce swappiness
21 > - put /var/tmp/portage on tmpfs
22 >
23 > so, do you guys think that's a good setup?
24 >
26 swap: this will make one of the bigger speedups to the system when you
27 need swap. swap is good - yes you can do without it, but the day comes
28 when you REALLY do want it, and ... [crash!] ... otherwise it can just
29 sit there waiting :)
31 /etc/sysctl.conf:
33 #vm.swappiness=1
34 #vm.vfs_cache_pressure=50
36 these were recommended to me for running vm's and seem to do the job
37 (usually I am running with a several GB of swap (16G ram, 16G swap) in
38 use ... these settings definitely minimise it though big rsync jobs
39 stall when it fills ram+swap.
41 /var/tmp/portage is a more difficult one ... a long thread way back
42 (Dale, I think you were in it) looking at speed showed there was no
43 speed advantage to compiling in tempfs because spinner) disk caching was
44 so good the data only hit the disk when necessary. I presume the same
45 will apply with compiling and SSD's in that the actual writes will be
46 minimal (in the scheme of things) so it shouldn't be a worry. My
47 experience with compiling in tempfs is that it works, but has a much
48 higher failure rate than on disk - i.e., things like OO/Lo, KDE, gcc and
49 glibc have large space requirements that you must make sure tmpfs can
50 satisfy before you start. And if its a busy machine actively using lots
51 of ram it gets "hard". I am making the point that most machines today
52 are way overprovisioned but when you are near the edge, saying things
53 like I gave xGB ram and never needed swap, so you wont either is
54 misrepresenting the situation.
56 BillK


Subject Author
Re: [gentoo-user] more on SSD: swap Alan McKinnon <alan.mckinnon@×××××.com>
Re: [gentoo-user] more on SSD: swap Dale <rdalek1967@×××××.com>
Re: [gentoo-user] more on SSD: swap Volker Armin Hemmann <volkerarmin@××××××××××.com>