# SSD drive for root

## Joseph_sys

I'm putting a new system together and the hardware guy suggesting installing  SSD drive for root.

Due to Gentoo nature of compiling, won't I kill it too fast.

I know when I was buying EEEPC 1000H (with SSD drive) I was advise against installing Gentoo on SSD as it would kill it before I would be able to compile the system  :Smile: .

My current selection that was suggested to me:

 *Quote:*   

> - Gigabyte GA-990FXA-UD5 motherboard
> 
> - AMD FX-8150 Processor 3.6GHz 8 Core
> 
> - ThermalTake TR2 430W PSU
> ...

 

Should I include SSD or skip it?

----------

## EatMeerkats

With 8 GB RAM, you could put the following line in your /etc/fstab and compile (almost) everything in memory:

```
tmpfs                   /var/tmp/portage    tmpfs               defaults        0 0
```

Some very large packages (LibreOffice?) might fail, but you could unmount /var/tmp/portage in those cases.

----------

## WorBlux

I don't think killing the drive is a big concern. I've had one nine months and have only gone though about 1/200 (5/1000) of the expected write cycles. I fully expect the capacitors to fail before the memory cells do. Especially if you have that much ram, and can compile the the -pipe flag.

I didn't even partition the drive, just wrote the file system directly to /dev/sda/, used the MBR on /dev/sdb to boot and for the swap space.

```
=== START OF INFORMATION SECTION ===

Model Family:     SandForce Driven SSDs

Device Model:     OCZ-AGILITY2 3.5

Serial Number:    OCZ-Y38F5G1R68F2L3FP

Firmware Version: 1.33

User Capacity:    90,028,302,336 bytes

Device is:        In smartctl database [for details use: -P show]

ATA Version is:   8

ATA Standard is:  ATA-8-ACS revision 6

Local Time is:    Sun Nov 13 14:20:24 2011 CST

SMART support is: Available - device has SMART capability.

SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===

SMART overall-health self-assessment test result: PASSED

General SMART Values:

Offline data collection status:  (0x00)   Offline data collection activity

               was never started.

               Auto Offline Data Collection: Disabled.

Self-test execution status:      (   0)   The previous self-test routine completed

               without error or no self-test has ever 

               been run.

Total time to complete Offline 

data collection:        (   0) seconds.

Offline data collection

capabilities:           (0x7f) SMART execute Offline immediate.

               Auto Offline data collection on/off support.

               Abort Offline collection upon new

               command.

               Offline surface scan supported.

               Self-test supported.

               Conveyance Self-test supported.

               Selective Self-test supported.

SMART capabilities:            (0x0003)   Saves SMART data before entering

               power-saving mode.

               Supports SMART auto save timer.

Error logging capability:        (0x01)   Error logging supported.

               General Purpose Logging supported.

Short self-test routine 

recommended polling time:     (   1) minutes.

Extended self-test routine

recommended polling time:     (   5) minutes.

Conveyance self-test routine

recommended polling time:     (   2) minutes.

SCT capabilities:           (0x003d)   SCT Status supported.

               SCT Error Recovery Control supported.

               SCT Feature Control supported.

               SCT Data Table supported.

SMART Attributes Data Structure revision number: 10

Vendor Specific SMART Attributes with Thresholds:

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE

  1 Raw_Read_Error_Rate     0x000f   105   099   050    Pre-fail  Always       -       0/10557907

  5 Retired_Block_Count     0x0033   100   100   003    Pre-fail  Always       -       0

  9 Power_On_Hours_and_Msec 0x0032   100   100   000    Old_age   Always       -       3005h+49m+49.270s

 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       230

171 Program_Fail_Count      0x0032   000   000   000    Old_age   Always       -       0

172 Erase_Fail_Count        0x0032   000   000   000    Old_age   Always       -       0

174 Unexpect_Power_Loss_Ct  0x0030   000   000   000    Old_age   Offline      -       23

177 Wear_Range_Delta        0x0000   000   000   000    Old_age   Offline      -       0

181 Program_Fail_Count      0x0032   000   000   000    Old_age   Always       -       0

182 Erase_Fail_Count        0x0032   000   000   000    Old_age   Always       -       0

187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0

194 Temperature_Celsius     0x0022   030   030   000    Old_age   Always       -       30 (Min/Max 30/30)

195 ECC_Uncorr_Error_Count  0x001c   105   099   000    Old_age   Offline      -       0/10557907

196 Reallocated_Event_Count 0x0033   100   100   000    Pre-fail  Always       -       0

231 SSD_Life_Left           0x0013   100   100   010    Pre-fail  Always       -       0

233 SandForce_Internal      0x0000   000   000   000    Old_age   Offline      -       832

234 SandForce_Internal      0x0032   000   000   000    Old_age   Always       -       448

241 Lifetime_Writes_GiB     0x0032   000   000   000    Old_age   Always       -       448

242 Lifetime_Reads_GiB      0x0032   000   000   000    Old_age   Always       -       896

```

----------

## Joseph_sys

I could do: 

tmpfs                   /var/tmp/portage    tmpfs               defaults        0 0

What is going to happen if I compile large package and don't unmount  /var/tmp/portage (so I run out of disk space in memory drive). 

Will it crash the system or just fails?

----------

## EatMeerkats

 *Joseph_sys wrote:*   

> I could do: 
> 
> tmpfs                   /var/tmp/portage    tmpfs               defaults        0 0
> 
> What is going to happen if I compile large package and don't unmount  /var/tmp/portage (so I run out of disk space in memory drive). 
> ...

 

Just fails.  I agree with WorBlux though, a good SSD has such a long lifespan that you shouldn't worry about it at all.  Take http://download.intel.com/pressroom/kits/ssd/pdf/Intel_SSD_510_Series_Product_Specification.pdf for example – their specs say that you can write 20 GB every day for 5 years before the SSD will fail.  And don't think this limited to "high-end" Intel SSDs either – their 320 and 310 series specs say the exact same thing.  Just don't worry about it.

----------

## albright

 *Quote:*   

> With 8 GB RAM, you could put the following line in your /etc/fstab and compile (almost) everything in memory: 
> 
> ```
> tmpfs                   /var/tmp/portage    tmpfs               defaults        0 0
> ```
> ...

 

this can be done automatically,

put 

```
PORTAGE_TMPDIR="/var/tmp/notmpfs"
```

(or wherever you like)

in /etc/portage/env/notmpsf.conf

and lines like this

```
app-office/libreoffice notmpfs.conf
```

in /etc/portage/package.env

----------

## Hypnos

FWIW, my latest compile of libreoffice took no more than 3.5GB of space.  This would easily fit in a 6GB RAM disk.  AFAIK, what makes the libreoffice compile big is debug support and/or turning on all the USE flags.

Also, many small writes do kill your SSD faster than fewer big writes, because the minimum "erase block" size of a typical SSD is rather large, like 128KB or more.  So, to commit a small change to a full disk would require rewriting an entire erase block.  In this way, one could easily generate more write cycles than the amount of data would indicate.

----------

