# SSD and HDD - partitioning?

## pdr

I just got a small (40G) SDD and a 320G HDD that I want to use to replace my current single hard drive. I currently use up:

```
 18GB /

 13MB /boot

 12GB /home (luks encrypted)

1.6GB /var

150MB /tmp
```

Recently I have set up /var/tmp/portage to be mountable on tmpfs. The partitioning I am thing of is (here called hdd and ssd instead of sda and sdb because not sure yet who will be who - may use UUID instead):

```
ssd1 /

hdd1 /boot (because it is only used when booting - why waste the speed?)

hdd2 swap

hdd3 /home (on the thought that things in there change often - but not a concern with an OCZ Vertex 2?)

hdd5 /var/tmp/portage (mainly if I forget to mount the tmpfs)

hdd6 /tmp
```

Thoughts or suggestions? Media files are not a concern - they are stored on my server and NFS shared. Even though it will all fit on the (actually usable 35GB) SSD, I do not want to go that route because that is too close to the edge.

----------

## 1clue

Is this a laptop?

FWIW an SSD last time I looked had worse transfer rate than a good hard disk.  It excels for two reasons:  shock/vibration, and random access.

I would put /home on that with a link for large files elsewhere, and maybe /tmp.  That said I've done some reading on SSD but never bought one, so I might not be the guy to ask.   :Smile: 

----------

## ssteinberg

 *1clue wrote:*   

> Is this a laptop?
> 
> FWIW an SSD last time I looked had worse transfer rate than a good hard disk.  It excels for two reasons:  shock/vibration, and random access.
> 
> 

 

Even the cheapest SSDs are overrall an upgrade over cheap harddrives for desktop platforms, while modern more expensive and higher capacity SSDs easily saturate SATA II's 3Gbit/s (300MB/s practical).

Logs, temps and home directory on the HDD, the rest should fit on the SDD.

----------

## 1clue

That's funny, because my HDD's have a faster sustained transfer rate than any SSD I've encountered so far, and they're not really that special for only slightly more than the bargain basement price.

 At first I thought my brain was playing tricks on me, but I started asking verification.  I've looked several times at a SSD for my system, and it just doesn't make sense in my case.  I have lots of RAM, my HDD's have a good sized cache on them, and none of the things I do has a huge amount of random access.  And, when you escape theories and get to actual devices that you can buy for money that you can pay, the HDD is faster unless you consider random access.  Or at least it was about 3 months ago.

I've read lots of articles pointing out that SSD's should be faster, but not when you start looking for the devices and comparing actual numbers.  Start looking at newegg or cdw or whatever place you buy your stuff from, not at some magazine.

Ever notice how just about the only place you see SSD's is on laptops?  If they were significantly faster you would see no HDD boot drives on any server anywhere.  The difference in cost between a decent 40g SSD and a hard drive of any reasonable size is not that big, and anyone building a decent server will use any trick they can come up with to make it faster.

----------

## pdr

1clue - this Vertex 2 is a magnitude faster at reading and writing than your hard drives unless you have SAS in raid 0 - in which case it would be a linear factor instead of a magnitude.. And I buy almost all my hardware from NewEgg. And do check out user reviews there on (a relatively recent version of) SSDs.

ssteinberg - why the logs? The drive DOES have wear leveling, and I thought it was the erase cycle that did the wear - shouldn't even have a chance until logrotate kicks in (ie once a day)...

----------

## EatMeerkats

 *1clue wrote:*   

> That's funny, because my HDD's have a faster sustained transfer rate than any SSD I've encountered so far, and they're not really that special for only slightly more than the bargain basement price.
> 
>  At first I thought my brain was playing tricks on me, but I started asking verification.  I've looked several times at a SSD for my system, and it just doesn't make sense in my case.  I have lots of RAM, my HDD's have a good sized cache on them, and none of the things I do has a huge amount of random access.  And, when you escape theories and get to actual devices that you can buy for money that you can pay, the HDD is faster unless you consider random access.  Or at least it was about 3 months ago.
> 
> I've read lots of articles pointing out that SSD's should be faster, but not when you start looking for the devices and comparing actual numbers.  Start looking at newegg or cdw or whatever place you buy your stuff from, not at some magazine.
> ...

 

Any decent SSD is faster than a single hard drive by far: http://www.anandtech.com/show/3667/oczs-agility-2-reviewed-the-first-sf1200-with-mp-firmware/4

The WD VelociRaptor is one of the fastest hard drives available, and even for sequential read/write, it is under half the speed of a good SSD.  And when it comes to random read/writes, there is absolutely no comparison… any SSD will blow a hard drive out of the water.  Launching programs becomes virtually instant, and since I've gotten so used to it, it's strange to me when Chromium takes a few seconds to launch on my MacBook Pro (which has an HDD). GRUB -> GDM login screen takes a mere 12 seconds on my SSD.

Another good read: Why You Absolutely Need an SSD - http://www.anandtech.com/show/2829/20. I didn't believe it until I experienced it, but the difference really is night and day.

----------

## ssteinberg

 *1clue wrote:*   

> 
> 
> I've read lots of articles pointing out that SSD's should be faster, but not when you start looking for the devices and comparing actual numbers.  Start looking at newegg or cdw or whatever place you buy your stuff from, not at some magazine.
> 
> Ever notice how just about the only place you see SSD's is on laptops?  If they were significantly faster you would see no HDD boot drives on any server anywhere.  The difference in cost between a decent 40g SSD and a hard drive of any reasonable size is not that big, and anyone building a decent server will use any trick they can come up with to make it faster.

 

Servers are still mostly using SCSIs with heavy raid arrays, SATA is limited here. Servers require storage space, and SDDs are by far more expensieve per GB. 

What is so interesting about Newegg? Manufacturer stated performance numbers? Who cares? Go run some benchmarks, even Intel's old 2nd gen SSDs trash standard un-raided HDDs, newer ones saturate SATA II's bandwidth.

Every desktop does heavy random reads/writes, which are very slow, especially on mechanical drives. System boot, application loading, logging. Quality SSD can imporve desktop performance and responsiveness drastically. Even if your HDD has superior buffered write performance, it is meaningless in most practical scenarios.

pdr: Yeah, can keep them on the SSD then, you said 40GB SSD I supposed it was a value drive.

----------

## 1clue

Not really interested in getting into an argument about this, and not really trying to disrespect the OP's new toy -- it's really cool and I want one.  Frankly there's nothing special about newegg, I have bought stuff there but usually try for a store front if I can get the product I want there.  I only mentioned it because it's where a lot of people shop.

On the other hand a lot can be done with configuration and RAM.  No doubt if you installed your system and paid no attention to tweaking it, then compared that with the same system which has an SSD that costs 4x as much as the spinning drive, then this drive would make a lot of difference.

I think the studies you referenced seem to ignore overall system performance.  It's not hard to have the OS cache disk access in RAM so the second access is direct RAM rather than through the disk interface.  It dramatically improves performance when you just don't need to hit that bottleneck at all.  Tmpfs is a wonderful thing if you can figure out where all your intensive temp file activity happens, and if you have enough RAM then those files never pass through the disk interface at all.  Anything small enough that is considered volatile should stay in RAM unless you need the space, and as far as I can tell the algorithms that control swap are very good at determining what should be swapped out.

I've seriously pondered SSD benefits several times.  I just haven't seen many servers advertised with them, which IMO is where any speed improvement would be most desirable.  Face it, most home gear sits there and does nothing, but does it really fast.  My system is used for testing and development, there are sometimes large databases there (more than a million rows) but overall I'm hitting a few small directories with temp files, building a product and then saving that on a disk.  Once I've launched an app, it's generally cached at least for awhile (usually weeks), and next time it launches it's probably every bit as fast as your SSD.  So you're gaining first-time-access performance with the SSD, or if you keep running out of RAM then maybe the SSD speeds things up because you have to reload.

The numbers you've shown are higher than the ones I saw awhile back, so you've definitely opened my eyes a bit.  On the other hand, there's more than one way to skin a cat if you're willing to put some effort into it.

The one place where an SSD makes huge sense is on a laptop.  There you get no arguments from me at all.  The power savings alone makes an impressive dent on battery usage.

Anyway good luck and have fun.

----------

## darkphader

 *pdr wrote:*   

> Recently I have set up /var/tmp/portage to be mountable on tmpfs.

 

Built up a couple of Atom based Gentoo servers using SSD's and put both /tmp and /var/tmp on tmpfs. Just seemed prudent.

----------

## pdr

I have decided to end up with:

```

/ 10GB partition on SSD

/home remaining space on SSD (with Luks)

/boot 50MB partition on HDD

swap partition on HDD

/usr/portage/distfiles 40GB partition on HDD

/var/tmp/portage 40GB partition on HDD (backing store in case I forget to mount /var/tmp/portage to tmpfs, or if need the space for eg Oo)

/tmp using tmpfs

/var/tmp using tmpfs

```

Although I list 4 HDD partitions, one is extended (ie can make more partitions) - rest of space on the drive is in case I have to tweak.

----------

