# Saving SSD write cycles

## Voltago

Now I've finally got around to get a new laptop, I went for one with a SSD (Thinkpad T410s). As I'm a bit unsure about the MTBF of its not-that-recent SSD (THNS128GG4BAAA-NonFDE, Toshiba 128GB, no TRIM goddamnit), I think it's a good idea to cut down write cycles a bit.

My ideas so far:

* /tmp, /var/tmp in shared memory (hence no worries while compiling)

* /var/log in shared memory, tarball is created at powerdown

Does anybody have any more ideas, or any experiences or insights in that topic they want to share?

P. S.: And yes, I've created this thread for the sole purpose of bragging about my new 1337 machine.  :Wink: Last edited by Voltago on Tue Aug 10, 2010 7:04 pm; edited 1 time in total

----------

## bjlockie

http://en.gentoo-wiki.com/wiki/Solid_State_Disk

http://www.mp3car.com/vbulletin/linux/125019-tuning-linux-ssd-operation.html

http://brainwreckedtech.wordpress.com/2009/05/14/linux-ssd-optimizations/

----------

## Hypnos

You should only care about writes that are bigger than to your personal files and to your system software and settings, which presumably must be non-volatile.  Otherwise, it's not worth the trouble.

My most frequent writes are to /home and /usr/portage , probably a few hundred MB/week.

By this logic, I only care about /var/tmp/paludis and /tmp , and mount those on ramdisk.

As for the lack of TRIM support, that's really annoying on Lenovo's part, but do you know that the disk can be replenished by using secure erase?  Then, all you need is daily backups, which everyone has </sarcasm>

----------

## lindegur

```
vmstat -d
```

 Shows you the statistics of how many times the system wrote to the various disks.

Then you can decide yourself  :Wink: 

Currently I just have my home directory not on the SSD (it would also to be too big) and the result looks not bad.

/tmp and /var are also candidates to move away. But some boot  issues due to mounting and linking occurred when on my first attempt to do so.  :Crying or Very sad: 

Maybe somebody knows how to solve that  :Rolling Eyes: 

----------

## joeklow

My slow netbook SSD locks annoyingly when reading/writing lots of data.

Any way to make a ram cache, that will flush to disk at when reading operation stops? (like FlashFire on Win)

----------

## Hypnos

 *joeklow wrote:*   

> My slow netbook SSD locks annoyingly when reading/writing lots of data.
> 
> Any way to make a ram cache, that will flush to disk at when reading operation stops? (like FlashFire on Win)

 

Both reading and writing, or just writing?  Linux already has caching.

Maybe your SSD is suffering from write amplification.  If it doesn't support TRIM, you can do a secure erase with hdparm to wipe the drive clean.

----------

