Gentoo Archives: gentoo-user

From: Markus Kaindl <markus.kaindl@××××××××××.de>
To: gentoo-user@l.g.o
Cc: Peter Wilmott <p@×××××.info>
Subject: Re: [gentoo-user] more on SSD: swap
Date: Fri, 26 Jul 2013 20:12:19
Message-Id: 51F2D817.8030609@stusta.mhn.de
In Reply to: Re: [gentoo-user] more on SSD: swap by Peter Wilmott
1 Am 21.07.2013 16:42, schrieb Peter Wilmott:
2 > On 21/07/13 15:31, luis jure wrote:
3 >> OK, now i have my system successfully installed and running on my new
4 >> SSD.
5 >> now i have to decide what to do with the rest of the disk (it's a 256MB
6 >> samsung).
7 >>
8 >> the first big question is: what about swap? i found some web pages
9 >> (perhaps old) stating that it's not wise to put swap on the SSD
10 >> because of
11 >> all the read/writes. but apparently from what i read on the recent
12 >> thread on this list, that shouldn't be much of a concern now.
13 >>
14 >> i also read somewhere that if you have swap on the SSD and want to avoid
15 >> unnecessary read/writes, you can reduce swappiness. i have 12GB RAM and i
16 >> think normally i don't really need swap space on disk, so i thought that
17 >> could be a good idea.
18 >>
19 >> so what i'm planning to do now is:
20 >>
21 >> - put swap on the SSD
22 >> - reduce swappiness
23 >> - put /var/tmp/portage on tmpfs
24 >>
25 >> so, do you guys think that's a good setup?
26 >>
27 > TBH, unless you are really stressing your RAM usage (Lots of VMs or Java
28 > applications, stuff like that) I'd go without swap. I've been running
29 > swapless on 8GB of RAM for a number of years now with no issues.
30 >
31 > As for /var/tmp/portage on tmpfs, this is fine 95% of the time, however
32 > even with ~2GB I allocate some packages (Chromium, LibreOffice, ect)
33 > will fail to compile due to lack of space. In these cases I just
34 > un-mount /var/tmp/portage, do the compile on the disk, and then re-mount
35 > it.
36 >
37
38 Portage can do that for you for packages you know to need that much space:
39 markus@Nanga-Parbat ~ $ cat /etc/portage/env/notmpfs
40 PORTAGE_TMPDIR="/var/tmp_notmpfs"
41 [Fr 26.07.13 22:06 CEST][pts/2][x86_64/linux-gnu/3.10.1-gentoo][5.0.2]
42 markus@Nanga-Parbat ~ $ cat /etc/portage/package.env
43 www-client/firefox notmpfs
44 [Fr 26.07.13 22:06 CEST][pts/2][x86_64/linux-gnu/3.10.1-gentoo][5.0.2]
45 markus@Nanga-Parbat ~ $ mount | grep /var/tmp
46 /dev/mapper/Nanga--Parbat--SSD-system--var--tmp_notmpfs on
47 /var/tmp_notmpfs type btrfs (rw,noatime,ssd,autodefrag,compress=lzo)
48 none on /var/tmp type tmpfs (rw,size=6350m)
49
50 (Firefox is still in there from my pgo-builds, I should remove that now :D)
51
52 Also:
53 markus@Nanga-Parbat ~ $ free -h
54 total used free shared buffers cached
55 Mem: 15G 12G 3,6G 0B 336M 6,0G
56 -/+ buffers/cache: 5,7G 9,9G
57 Swap: 0B 0B 0B
58
59 never had any problems without swap, since i got more than 4GB of RAM ;)
60
61 Regards,
62 Markus

Attachments

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