public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] more on SSD: swap
@ 2013-07-21 14:31 luis jure
  2013-07-21 14:34 ` Jarry
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: luis jure @ 2013-07-21 14:31 UTC (permalink / raw
  To: gentoo-user


OK, now i have my system successfully installed and running on my new SSD.
now i have to decide what to do with the rest of the disk (it's a 256MB
samsung).

the first big question is: what about swap? i found some web pages
(perhaps old) stating that it's not wise to put swap on the SSD because of
all the read/writes. but apparently from what i read on the recent
thread on this list, that shouldn't be much of a concern now. 

i also read somewhere that if you have swap on the SSD and want to avoid
unnecessary read/writes, you can reduce swappiness. i have 12GB RAM and i
think normally i don't really need swap space on disk, so i thought that
could be a good idea.

so what i'm planning to do now is:

- put swap on the SSD 
- reduce swappiness 
- put /var/tmp/portage on tmpfs

so, do you guys think that's a good setup?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 14:31 [gentoo-user] more on SSD: swap luis jure
@ 2013-07-21 14:34 ` Jarry
  2013-07-21 15:24   ` Alan McKinnon
  2013-07-21 14:42 ` Peter Wilmott
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 17+ messages in thread
From: Jarry @ 2013-07-21 14:34 UTC (permalink / raw
  To: gentoo-user

On 21-Jul-13 16:31, luis jure wrote:
>
> so what i'm planning to do now is:
>
> - put swap on the SSD
> - reduce swappiness
> - put /var/tmp/portage on tmpfs
>
> so, do you guys think that's a good setup?

Sounds good to me. But with 12GB RAM the question is:
Do you need swap at all?

Jarry
-- 
_______________________________________________________________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 14:31 [gentoo-user] more on SSD: swap luis jure
  2013-07-21 14:34 ` Jarry
@ 2013-07-21 14:42 ` Peter Wilmott
  2013-07-21 15:39   ` luis jure
  2013-07-26 20:12   ` Markus Kaindl
  2013-07-21 19:39 ` Volker Armin Hemmann
  2013-07-21 22:19 ` William Kenworthy
  3 siblings, 2 replies; 17+ messages in thread
From: Peter Wilmott @ 2013-07-21 14:42 UTC (permalink / raw
  To: gentoo-user

On 21/07/13 15:31, luis jure wrote:
> OK, now i have my system successfully installed and running on my new SSD.
> now i have to decide what to do with the rest of the disk (it's a 256MB
> samsung).
>
> the first big question is: what about swap? i found some web pages
> (perhaps old) stating that it's not wise to put swap on the SSD because of
> all the read/writes. but apparently from what i read on the recent
> thread on this list, that shouldn't be much of a concern now.
>
> i also read somewhere that if you have swap on the SSD and want to avoid
> unnecessary read/writes, you can reduce swappiness. i have 12GB RAM and i
> think normally i don't really need swap space on disk, so i thought that
> could be a good idea.
>
> so what i'm planning to do now is:
>
> - put swap on the SSD
> - reduce swappiness
> - put /var/tmp/portage on tmpfs
>
> so, do you guys think that's a good setup?
>
TBH, unless you are really stressing your RAM usage (Lots of VMs or Java 
applications, stuff like that) I'd go without swap. I've been running 
swapless on 8GB of RAM for a number of years now with no issues.

As for /var/tmp/portage on tmpfs, this is fine 95% of the time, however 
even with ~2GB I allocate some packages (Chromium, LibreOffice, ect) 
will fail to compile due to lack of space. In these cases I just 
un-mount /var/tmp/portage, do the compile on the disk, and then re-mount 
it.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 14:34 ` Jarry
@ 2013-07-21 15:24   ` Alan McKinnon
  0 siblings, 0 replies; 17+ messages in thread
From: Alan McKinnon @ 2013-07-21 15:24 UTC (permalink / raw
  To: gentoo-user

On 21/07/2013 16:34, Jarry wrote:
> On 21-Jul-13 16:31, luis jure wrote:
>>
>> so what i'm planning to do now is:
>>
>> - put swap on the SSD
>> - reduce swappiness
>> - put /var/tmp/portage on tmpfs
>>
>> so, do you guys think that's a good setup?
> 
> Sounds good to me. But with 12GB RAM the question is:
> Do you need swap at all?
> 
> Jarry


yes, he does, but not for the reason most people think

tmpfs is backed by swap :-)



Swap was originally introduced waaaaaaaaay back in the 60s as a
workaround for computers that had far less RAM than the workload
strictly needed. This has not fundamentally changed in any significant
way 40 years later so like you, I always favour having enough RAM.

And RAM is MUCH cheaper than SSDs and requires no fiddling and tweaking
to be able to use it.

-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 14:42 ` Peter Wilmott
@ 2013-07-21 15:39   ` luis jure
  2013-07-21 18:23     ` Florian Philipp
  2013-07-26 20:12   ` Markus Kaindl
  1 sibling, 1 reply; 17+ messages in thread
From: luis jure @ 2013-07-21 15:39 UTC (permalink / raw
  To: gentoo-user

on 2013-07-21 at 15:42 Peter Wilmott wrote:

> TBH, unless you are really stressing your RAM usage (Lots of VMs or Java 
> applications, stuff like that) I'd go without swap.

it's true that most of the time 12BG is more than enough for me and i
don't use swap space on disk. i wouldn't go for a swapless system, though,
specially since i'm going to put things on tmpfs.

a few GB (i'm thinking about 8) of swap space on disk won't hurt, and i'd
feel safer. that's the idea of reducing swappiness to 1 or 0, anyway.

best,


lj


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 15:39   ` luis jure
@ 2013-07-21 18:23     ` Florian Philipp
  0 siblings, 0 replies; 17+ messages in thread
From: Florian Philipp @ 2013-07-21 18:23 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

Am 21.07.2013 17:39, schrieb luis jure:
> on 2013-07-21 at 15:42 Peter Wilmott wrote:
> 
>> TBH, unless you are really stressing your RAM usage (Lots of VMs or Java 
>> applications, stuff like that) I'd go without swap.
> 
> it's true that most of the time 12BG is more than enough for me and i
> don't use swap space on disk. i wouldn't go for a swapless system, though,
> specially since i'm going to put things on tmpfs.
> 
> a few GB (i'm thinking about 8) of swap space on disk won't hurt, and i'd
> feel safer. that's the idea of reducing swappiness to 1 or 0, anyway.
> 

Also think about using zswap or frontswap. Both work well despite still
being in staging in current kernels. Zswap will be stabilized in kernel
3.11, I think.

Regards,
Florian Philipp



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 14:31 [gentoo-user] more on SSD: swap luis jure
  2013-07-21 14:34 ` Jarry
  2013-07-21 14:42 ` Peter Wilmott
@ 2013-07-21 19:39 ` Volker Armin Hemmann
  2013-07-21 19:56   ` Neil Bothwick
  2013-07-21 22:19 ` William Kenworthy
  3 siblings, 1 reply; 17+ messages in thread
From: Volker Armin Hemmann @ 2013-07-21 19:39 UTC (permalink / raw
  To: gentoo-user; +Cc: luis jure

Am Sonntag, 21. Juli 2013, 11:31:41 schrieb luis jure:
> OK, now i have my system successfully installed and running on my new SSD.
> now i have to decide what to do with the rest of the disk (it's a 256MB
> samsung).
> 
> the first big question is: what about swap? i found some web pages
> (perhaps old) stating that it's not wise to put swap on the SSD because of
> all the read/writes. but apparently from what i read on the recent
> thread on this list, that shouldn't be much of a concern now.
> 
> i also read somewhere that if you have swap on the SSD and want to avoid
> unnecessary read/writes, you can reduce swappiness. i have 12GB RAM and i
> think normally i don't really need swap space on disk, so i thought that
> could be a good idea.
> 
> so what i'm planning to do now is:
> 
> - put swap on the SSD

don't make a swap partition, use a swapfile.

> - reduce swappiness

only swapon if you really need it.

> - put /var/tmp/portage on tmpfs

good, but also put /tmp on tmpfs.

And maybe /var on a harddisk.

>
-- 
#163933


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 19:39 ` Volker Armin Hemmann
@ 2013-07-21 19:56   ` Neil Bothwick
  2013-07-21 22:02     ` Volker Armin Hemmann
  0 siblings, 1 reply; 17+ messages in thread
From: Neil Bothwick @ 2013-07-21 19:56 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

On Sun, 21 Jul 2013 21:39:29 +0200, Volker Armin Hemmann wrote:

> > - put /var/tmp/portage on tmpfs  
> 
> good, but also put /tmp on tmpfs.

Doesn't the FHS spec say that /var/tmp should survive a reboot? So the
correct approach is to put /tmp on a tmpfs and set  PORTAGE_TMPDIR
to /tmp.


-- 
Neil Bothwick

Mosquito - designed to make houseflies look better.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 19:56   ` Neil Bothwick
@ 2013-07-21 22:02     ` Volker Armin Hemmann
  0 siblings, 0 replies; 17+ messages in thread
From: Volker Armin Hemmann @ 2013-07-21 22:02 UTC (permalink / raw
  To: Gentoo User

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

should - not must have to survive. And nothing in /var/tmp/portage is
important enough. So just let it get lost.

I would not put PORTAGE_TMPDIR to /tmp because if it accidentally fills up,
you have a big problem. While a seperate tmpfs /var/tmp/portage... well
nobody cares if it is full. Yeah, emerge fails but that's it.


2013/7/21 Neil Bothwick <neil@digimed.co.uk>

> On Sun, 21 Jul 2013 21:39:29 +0200, Volker Armin Hemmann wrote:
>
> > > - put /var/tmp/portage on tmpfs
> >
> > good, but also put /tmp on tmpfs.
>
> Doesn't the FHS spec say that /var/tmp should survive a reboot? So the
> correct approach is to put /tmp on a tmpfs and set  PORTAGE_TMPDIR
> to /tmp.
>
>
> --
> Neil Bothwick
>
> Mosquito - designed to make houseflies look better.
>

[-- Attachment #2: Type: text/html, Size: 1230 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 14:31 [gentoo-user] more on SSD: swap luis jure
                   ` (2 preceding siblings ...)
  2013-07-21 19:39 ` Volker Armin Hemmann
@ 2013-07-21 22:19 ` William Kenworthy
  2013-07-22  6:24   ` Alan McKinnon
                     ` (2 more replies)
  3 siblings, 3 replies; 17+ messages in thread
From: William Kenworthy @ 2013-07-21 22:19 UTC (permalink / raw
  To: gentoo-user

On 21/07/13 22:31, luis jure wrote:
> 
> OK, now i have my system successfully installed and running on my new SSD.
> now i have to decide what to do with the rest of the disk (it's a 256MB
> samsung).
> 
> the first big question is: what about swap? i found some web pages
> (perhaps old) stating that it's not wise to put swap on the SSD because of
> all the read/writes. but apparently from what i read on the recent
> thread on this list, that shouldn't be much of a concern now. 
> 
> i also read somewhere that if you have swap on the SSD and want to avoid
> unnecessary read/writes, you can reduce swappiness. i have 12GB RAM and i
> think normally i don't really need swap space on disk, so i thought that
> could be a good idea.
> 
> so what i'm planning to do now is:
> 
> - put swap on the SSD 
> - reduce swappiness 
> - put /var/tmp/portage on tmpfs
> 
> so, do you guys think that's a good setup?
> 

swap: this will make one of the bigger speedups to the system when you
need swap.  swap is good - yes you can do without it, but the day comes
when you REALLY do want it, and ... [crash!] ... otherwise it can just
sit there waiting :)

/etc/sysctl.conf:

#vm.swappiness=1
#vm.vfs_cache_pressure=50

these were recommended to me for running vm's and seem to do the job
(usually I am running with a several GB of swap (16G ram, 16G swap) in
use ... these settings definitely minimise it though big rsync jobs
stall when it fills ram+swap.

/var/tmp/portage is a more difficult one ... a long thread way back
(Dale, I think you were in it) looking at speed showed there was no
speed advantage to compiling in tempfs because spinner) disk caching was
so good the data only hit the disk when necessary.  I presume the same
will apply with compiling and SSD's in that the actual writes will be
minimal (in the scheme of things) so it shouldn't be a worry.  My
experience with compiling in tempfs is that it works, but has a much
higher failure rate than on disk - i.e., things like OO/Lo, KDE, gcc and
glibc have large space requirements that you must make sure tmpfs can
satisfy before you start.  And if its a busy machine actively using lots
of ram it gets "hard".  I am making the point that most machines today
are way overprovisioned but when you are near the edge, saying things
like I gave xGB ram and never needed swap, so you wont either is
misrepresenting the situation.

BillK





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 22:19 ` William Kenworthy
@ 2013-07-22  6:24   ` Alan McKinnon
  2013-07-22  8:46     ` William Kenworthy
  2013-07-22  8:23   ` Dale
  2013-07-22  8:49   ` Volker Armin Hemmann
  2 siblings, 1 reply; 17+ messages in thread
From: Alan McKinnon @ 2013-07-22  6:24 UTC (permalink / raw
  To: gentoo-user

On 22/07/2013 00:19, William Kenworthy wrote:
> swap: this will make one of the bigger speedups to the system when you
> need swap.  swap is good - yes you can do without it, but the day comes
> when you REALLY do want it, and ... [crash!] ... otherwise it can just
> sit there waiting :)
> 
> /etc/sysctl.conf:
> 
> #vm.swappiness=1
> #vm.vfs_cache_pressure=50
> 


Do those settings set on the host or on the guest?



-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 22:19 ` William Kenworthy
  2013-07-22  6:24   ` Alan McKinnon
@ 2013-07-22  8:23   ` Dale
  2013-07-22  8:49   ` Volker Armin Hemmann
  2 siblings, 0 replies; 17+ messages in thread
From: Dale @ 2013-07-22  8:23 UTC (permalink / raw
  To: gentoo-user

William Kenworthy wrote:
> On 21/07/13 22:31, luis jure wrote:
>> OK, now i have my system successfully installed and running on my new SSD.
>> now i have to decide what to do with the rest of the disk (it's a 256MB
>> samsung).
>>
>> the first big question is: what about swap? i found some web pages
>> (perhaps old) stating that it's not wise to put swap on the SSD because of
>> all the read/writes. but apparently from what i read on the recent
>> thread on this list, that shouldn't be much of a concern now.
>>
>> i also read somewhere that if you have swap on the SSD and want to avoid
>> unnecessary read/writes, you can reduce swappiness. i have 12GB RAM and i
>> think normally i don't really need swap space on disk, so i thought that
>> could be a good idea.
>>
>> so what i'm planning to do now is:
>>
>> - put swap on the SSD
>> - reduce swappiness
>> - put /var/tmp/portage on tmpfs
>>
>> so, do you guys think that's a good setup?
>>
> swap: this will make one of the bigger speedups to the system when you
> need swap.  swap is good - yes you can do without it, but the day comes
> when you REALLY do want it, and ... [crash!] ... otherwise it can just
> sit there waiting :)
>
> /etc/sysctl.conf:
>
> #vm.swappiness=1
> #vm.vfs_cache_pressure=50
>
> these were recommended to me for running vm's and seem to do the job
> (usually I am running with a several GB of swap (16G ram, 16G swap) in
> use ... these settings definitely minimise it though big rsync jobs
> stall when it fills ram+swap.
>
> /var/tmp/portage is a more difficult one ... a long thread way back
> (Dale, I think you were in it) looking at speed showed there was no
> speed advantage to compiling in tempfs because spinner) disk caching was
> so good the data only hit the disk when necessary.  I presume the same
> will apply with compiling and SSD's in that the actual writes will be
> minimal (in the scheme of things) so it shouldn't be a worry.  My
> experience with compiling in tempfs is that it works, but has a much
> higher failure rate than on disk - i.e., things like OO/Lo, KDE, gcc and
> glibc have large space requirements that you must make sure tmpfs can
> satisfy before you start.  And if its a busy machine actively using lots
> of ram it gets "hard".  I am making the point that most machines today
> are way overprovisioned but when you are near the edge, saying things
> like I gave xGB ram and never needed swap, so you wont either is
> misrepresenting the situation.
>
> BillK
>
>

Yes, I did so some testing on whether portage's work directory on tmpfs 
instead of HDD was faster or not and it wasn't much difference.  I 
actually had a couple times where it was faster on HDD but could have 
been that some other process took up a few seconds of time too.  The 
difference was literally seconds on compiles that were between 30 
minutes to one hour.

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-22  8:46     ` William Kenworthy
@ 2013-07-22  8:45       ` Alan McKinnon
  0 siblings, 0 replies; 17+ messages in thread
From: Alan McKinnon @ 2013-07-22  8:45 UTC (permalink / raw
  To: gentoo-user

On 22/07/2013 10:46, William Kenworthy wrote:
> On 22/07/13 14:24, Alan McKinnon wrote:
>> On 22/07/2013 00:19, William Kenworthy wrote:
>>> swap: this will make one of the bigger speedups to the system when you
>>> need swap.  swap is good - yes you can do without it, but the day comes
>>> when you REALLY do want it, and ... [crash!] ... otherwise it can just
>>> sit there waiting :)
>>>
>>> /etc/sysctl.conf:
>>>
>>> #vm.swappiness=1
>>> #vm.vfs_cache_pressure=50
>>>
>>
>> Do those settings set on the host or on the guest?
>>
>>
>>
> Host ... they are applied via "pressure" on the guest memory via the
> balloon driver.  The couple of windows images seem to create problems
> for the linux images in that linux seems to work better together but
> with windows hogging the memory (worst case is a win7 and win8 running
> concurrently, nether play well.)  Have not looked further than reducing
> the memory allocated to windows (which triggered a genuine windows check
> on win7!) so they co-exist "uneasily"
> 
> BillK
> 
> 
> 


thanks

-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-22  6:24   ` Alan McKinnon
@ 2013-07-22  8:46     ` William Kenworthy
  2013-07-22  8:45       ` Alan McKinnon
  0 siblings, 1 reply; 17+ messages in thread
From: William Kenworthy @ 2013-07-22  8:46 UTC (permalink / raw
  To: gentoo-user

On 22/07/13 14:24, Alan McKinnon wrote:
> On 22/07/2013 00:19, William Kenworthy wrote:
>> swap: this will make one of the bigger speedups to the system when you
>> need swap.  swap is good - yes you can do without it, but the day comes
>> when you REALLY do want it, and ... [crash!] ... otherwise it can just
>> sit there waiting :)
>>
>> /etc/sysctl.conf:
>>
>> #vm.swappiness=1
>> #vm.vfs_cache_pressure=50
>>
>
> Do those settings set on the host or on the guest?
>
>
>
Host ... they are applied via "pressure" on the guest memory via the
balloon driver.  The couple of windows images seem to create problems
for the linux images in that linux seems to work better together but
with windows hogging the memory (worst case is a win7 and win8 running
concurrently, nether play well.)  Have not looked further than reducing
the memory allocated to windows (which triggered a genuine windows check
on win7!) so they co-exist "uneasily"

BillK




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 22:19 ` William Kenworthy
  2013-07-22  6:24   ` Alan McKinnon
  2013-07-22  8:23   ` Dale
@ 2013-07-22  8:49   ` Volker Armin Hemmann
  2013-07-22  9:55     ` Neil Bothwick
  2 siblings, 1 reply; 17+ messages in thread
From: Volker Armin Hemmann @ 2013-07-22  8:49 UTC (permalink / raw
  To: gentoo-user; +Cc: William Kenworthy

Am Montag, 22. Juli 2013, 06:19:09 schrieb William Kenworthy:
> experience with compiling in tempfs is that it works, but has a much
> higher failure rate than on disk - i.e., things like OO/Lo, KDE, gcc and
> glibc have large space requirements that you must make sure tmpfs can
> satisfy before you start.

em, no. KDE does not have large space requirements. LO does. The rest is happy 
with 2gb of tmpfs diskspace.


-- 
#163933


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-22  8:49   ` Volker Armin Hemmann
@ 2013-07-22  9:55     ` Neil Bothwick
  0 siblings, 0 replies; 17+ messages in thread
From: Neil Bothwick @ 2013-07-22  9:55 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 682 bytes --]

On Mon, 22 Jul 2013 10:49:48 +0200, Volker Armin Hemmann wrote:

> > experience with compiling in tempfs is that it works, but has a much
> > higher failure rate than on disk - i.e., things like OO/Lo, KDE, gcc
> > and glibc have large space requirements that you must make sure tmpfs
> > can satisfy before you start.  
> 
> em, no. KDE does not have large space requirements. LO does. The rest
> is happy with 2gb of tmpfs diskspace.

And portage checks for sufficient space for greedy packages before it
starts emerging anything, so if there is a problem you know right away.


-- 
Neil Bothwick

Therapy is expensive, popping bubble wrap is cheap! You choose.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] more on SSD: swap
  2013-07-21 14:42 ` Peter Wilmott
  2013-07-21 15:39   ` luis jure
@ 2013-07-26 20:12   ` Markus Kaindl
  1 sibling, 0 replies; 17+ messages in thread
From: Markus Kaindl @ 2013-07-26 20:12 UTC (permalink / raw
  To: gentoo-user; +Cc: Peter Wilmott

[-- Attachment #1: Type: text/plain, Size: 2593 bytes --]

Am 21.07.2013 16:42, schrieb Peter Wilmott:
> On 21/07/13 15:31, luis jure wrote:
>> OK, now i have my system successfully installed and running on my new
>> SSD.
>> now i have to decide what to do with the rest of the disk (it's a 256MB
>> samsung).
>>
>> the first big question is: what about swap? i found some web pages
>> (perhaps old) stating that it's not wise to put swap on the SSD
>> because of
>> all the read/writes. but apparently from what i read on the recent
>> thread on this list, that shouldn't be much of a concern now.
>>
>> i also read somewhere that if you have swap on the SSD and want to avoid
>> unnecessary read/writes, you can reduce swappiness. i have 12GB RAM and i
>> think normally i don't really need swap space on disk, so i thought that
>> could be a good idea.
>>
>> so what i'm planning to do now is:
>>
>> - put swap on the SSD
>> - reduce swappiness
>> - put /var/tmp/portage on tmpfs
>>
>> so, do you guys think that's a good setup?
>>
> TBH, unless you are really stressing your RAM usage (Lots of VMs or Java
> applications, stuff like that) I'd go without swap. I've been running
> swapless on 8GB of RAM for a number of years now with no issues.
> 
> As for /var/tmp/portage on tmpfs, this is fine 95% of the time, however
> even with ~2GB I allocate some packages (Chromium, LibreOffice, ect)
> will fail to compile due to lack of space. In these cases I just
> un-mount /var/tmp/portage, do the compile on the disk, and then re-mount
> it.
> 

Portage can do that for you for packages you know to need that much space:
markus@Nanga-Parbat ~ $ cat /etc/portage/env/notmpfs
PORTAGE_TMPDIR="/var/tmp_notmpfs"
[Fr 26.07.13 22:06 CEST][pts/2][x86_64/linux-gnu/3.10.1-gentoo][5.0.2]
markus@Nanga-Parbat ~ $ cat /etc/portage/package.env
www-client/firefox notmpfs
[Fr 26.07.13 22:06 CEST][pts/2][x86_64/linux-gnu/3.10.1-gentoo][5.0.2]
markus@Nanga-Parbat ~ $ mount | grep /var/tmp
/dev/mapper/Nanga--Parbat--SSD-system--var--tmp_notmpfs on
/var/tmp_notmpfs type btrfs (rw,noatime,ssd,autodefrag,compress=lzo)
none on /var/tmp type tmpfs (rw,size=6350m)

(Firefox is still in there from my pgo-builds, I should remove that now :D)

Also:
markus@Nanga-Parbat ~ $ free -h
             total       used       free     shared    buffers     cached
Mem:           15G        12G       3,6G         0B       336M       6,0G
-/+ buffers/cache:       5,7G       9,9G
Swap:           0B         0B         0B

never had any problems without swap, since i got more than 4GB of RAM ;)

Regards,
Markus


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-07-26 20:12 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-21 14:31 [gentoo-user] more on SSD: swap luis jure
2013-07-21 14:34 ` Jarry
2013-07-21 15:24   ` Alan McKinnon
2013-07-21 14:42 ` Peter Wilmott
2013-07-21 15:39   ` luis jure
2013-07-21 18:23     ` Florian Philipp
2013-07-26 20:12   ` Markus Kaindl
2013-07-21 19:39 ` Volker Armin Hemmann
2013-07-21 19:56   ` Neil Bothwick
2013-07-21 22:02     ` Volker Armin Hemmann
2013-07-21 22:19 ` William Kenworthy
2013-07-22  6:24   ` Alan McKinnon
2013-07-22  8:46     ` William Kenworthy
2013-07-22  8:45       ` Alan McKinnon
2013-07-22  8:23   ` Dale
2013-07-22  8:49   ` Volker Armin Hemmann
2013-07-22  9:55     ` Neil Bothwick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox