# SSD and gentoo, ideas, opinion

## Yczo

It's widely known that the SSD are the future of hard disks. It's also known that those expensive drives, easily broken through repeated overwriting, something that  we usually do through compile.

I propose that (for 8 Gbyte ram pcs or more), mount /var/tmp/portage/ on a ramdisk (I believe that the real time compiled data are stored there), and  on this way avoid to rewritte on the SSD.

What do you think guys?

----------

## Hypnos

Many people already do this, including me -- works fine.

There are numerous threads on this topic on the forums, if you want more details ...

----------

## Yczo

upsss I'm sorry

----------

## Hexorg

Yep, I do the same. I started mounting /var/tmp/portage to ram a while ago before I got an SSD, it's supposed to increase compile speed by a little, although I never noticed the difference. 

Also, aside from SSD I have 80.0GB harddrive, and 2TB harddrive, so I moved some other folders to harddrives:

```
/dev/sdc3        15G  3.6G   11G  26% /usr/portage

/dev/sdc5      1008M   34M  924M   4% /tmp

/dev/sdc6        15G  993M   14G   7% /usr/src

/dev/sdc7       461M   13M  424M   3% /var/log

tmpfs           6.0G     0  6.0G   0% /var/tmp

```

oh yeah, I moved /usr/src to the harddrive too because of kernel compilation.

----------

## asturm

I've got here a 512GB Crusial m4 SSD inside my notebook, so not a lot of choice (space) to outsource any kind of high-volatile data to an HDD, apart from /tmp and /var/tmp/portage that I had in a tmpfs all the time already. I searched around a lot for _the_ perfect SSD setup, but in the end decided to simply not care about it, format most of it with one big ext4 partition (to be able to make the most of it) and set the usual 'noatime', plus 'discard' option inside /etc/fstab. Works fine. SSDs these days are much more robust than their first generation, as long as you didn't choose one of the infamous OCZ drives.

----------

## indietrash

check my comments to bug 439276, https://bugs.gentoo.org/show_bug.cgi?id=439276.

----------

## dmpogo

And it is done easily by setting 

```

PORTAGE_TMPFS="/dev/shm"

PORTAGE_TMPDIR="/dev/shm"

```

in make.conf

I do it even on 4Gb laptop (and even did that when it was 2Gb laptop until this August)

----------

## _______0

 *dmpogo wrote:*   

> And it is done easily by setting 
> 
> ```
> 
> PORTAGE_TMPFS="/dev/shm"
> ...

 

That's it?? No need to create a directory in /tmp and add in fstab??

According to you I don't need this in fstab anymore:

```
tmpfs   /tmp/temp       tmpfs size=3G 0 0
```

mmm.. I'll try compiling firefox with pgo and see if it works.

----------

## tholin

 *Yczo wrote:*   

> It's also known that those expensive drives, easily broken through repeated overwriting, something that  we usually do through compile.

 

That's really nothing you have to worry about on modern SSDs. The SSD I use now should last at least 4 years when doing constant 24h compiling to it, probably a lot longer. My two year old SSD that I recently switched out was still at 96% capacity and I used it for compiling, swap, tmp logs, FS logs and everything else.

----------

