Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Solid state drive strategies? -- solved
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Apr 14, 2010 12:11 am    Post subject: Solid state drive strategies? -- solved Reply with quote

Hi,

I've been browsing around on the threads mentioning SSDs. I'm considering getting an 80-120g drive, and would like to know advice on which partitions to use SSD for and which to avoid. It didn't feel appropriate to post my questions on one of the other threads because none of them was sufficiently close to my situation.

I have an i7, 6G/1600 RAM, 4x750gx10000 rpm drives configured as RAID10.

I'm hoping to improve overall system performance. I'm not so interested in booting in under a nanosecond like another thread that's currently getting attention, I'm just looking to make best use of appropriate hardware.

This is a developer machine. I will use these things:

  1. VMware
  2. mysql
  3. Microsoft SQL server on one of the VMs
  4. Grails/Sun JDK
  5. Possibly Mac OS X on a VM.


I use large amounts of space for databases. Some databases are small, but frequently zapped and rebuilt. Others contain upwards of 150g, but mostly static.

I'm also interested in doing some OS development in a more traditional GCC setting.

I had thought to put tmpfs on the SSD, but after reading about the write limit I think that might not be a good idea. So put / on it, and anything that either takes a lot of hits or uses a lot of room, goes on the RAID array?

Looking for input.

Thanks.


Last edited by 1clue on Thu May 13, 2010 6:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Wed Apr 14, 2010 7:49 am    Post subject: Reply with quote

For the SSD I would put / on it except:

/var/
/tmp/
/home/

Since those locations change quite often. You can also put them in RAM. As for the SSD itself, I would use:

ext2 + nodiratime + noatime + laptop_mode etc etc just to prevent continuous writes instead of big bursts (which is what you want).
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Apr 14, 2010 5:39 pm    Post subject: Reply with quote

IMO, I could then use a much smaller drive, <=2g. Maybe /usr and /opt then too, except /usr/portage?

Thanks.
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Wed Apr 14, 2010 5:52 pm    Post subject: Reply with quote

I would not go below 2G lawl, you said you needed:

Quote:
1. VMware
2. mysql
3. Microsoft SQL server on one of the VMs
4. Grails/Sun JDK
5. Possibly Mac OS X on a VM.


So, you will definitly need Vmware player (or any other). I can tell you kernel + X infrastructure + Vmware + base packages won't fit on a 2G SSD I *think*. I suggest you go with 10G just to be on the safe side. You might never reach it, but you will regret it if you overload it.

Basically, anything that doesn't change each week can be put on the SSD. What I do, is that I install a Gentoo system during summer vacation, and then during the year (in which I hardly update) I make a small document with all the stuff I want changed. Next summer vacation, I implement those changes.

That will severly enhance the lifetime of your SSD (if you use noatime + EXT2 et all of course).
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Wed Apr 14, 2010 6:01 pm    Post subject: Reply with quote

What I usually do on new Gentoo installs is move /usr/portage to /var/ anyway, it makes more sense there.

If you get the large SSD, best filesystem to use on it would be btrfs if possible because it has a mode specifically for SSD use. Don't worry too much about writes burning it out, most of the large ones are designed to last about as long as hard drives.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Apr 14, 2010 6:03 pm    Post subject: Reply with quote

Rexillion,

I was considering a much larger drive for this, I'm just looking at how much space is used in the directories you described and surprised it wasn't more.

Of course the software itself can be on the SSD, but I wouldn't put the images on there. Nonetheless I don't think I would buy an SSD smaller than 32g anyway.

What about /boot? Is it safe to boot off an SSD?
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Wed Apr 14, 2010 7:25 pm    Post subject: Reply with quote

1clue wrote:
Rexillion,

I was considering a much larger drive for this, I'm just looking at how much space is used in the directories you described and surprised it wasn't more.

Of course the software itself can be on the SSD, but I wouldn't put the images on there. Nonetheless I don't think I would buy an SSD smaller than 32g anyway.

What about /boot? Is it safe to boot off an SSD?


Yeah, why not? It is 'safe', don't know if it's possible though (because of sector size?). You might need grub2....
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Apr 14, 2010 9:18 pm    Post subject: Reply with quote

You've given me something to think about.

Thanks.
Back to top
View user's profile Send private message
StifflerStealth
Retired Dev
Retired Dev


Joined: 03 Jul 2002
Posts: 968

PostPosted: Thu Apr 15, 2010 8:15 pm    Post subject: Reply with quote

With SSDs you need to align the partitions, which is a bit hard on Linux, but it aligns the writes properly and makes things faster. An improperly aligned SSD will have poor performance. I also agree with the above poster about using BTRFS. It has an SSD mode which supports the Trim feature, so get an SSD with Trim. If you don't do Trim'ing, the performance will go down by as much as 75% on some drives, while the better drives take about a 40 to 50% performance lose. I read an article about speed tests. It was very interesting. I have an OCZ Vertex with Trim support, but I had it before the firmware supported it, and I noticed the performance hit, then when Trim came out for it, I put the firmware on, wiped the drive using the special resetter, and things were incredibly fast. So, do your homework and read reviews. :)
_________________
Nothing to read in this sig. Move along.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Tue Apr 20, 2010 10:10 pm    Post subject: Reply with quote

I am using an OCZ Vertex 250 GB drive as my only drive on my laptop. Check out the OCZ forums for good threads discussing TRIM and garbage collection and proper alignment of partitions. To see how my drive is set up, check the thread at:

https://forums.gentoo.org/viewtopic-t-809431-highlight-.html

Where I chronacled the installation of Gentoo on my laptop. :D
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Apr 21, 2010 2:28 am    Post subject: Reply with quote

Thanks guys, I didn't know about aligning at all. I evidently need to do a lot more reading. :)
Back to top
View user's profile Send private message
jodel
Tux's lil' helper
Tux's lil' helper


Joined: 28 Sep 2004
Posts: 113

PostPosted: Wed Apr 21, 2010 3:50 pm    Post subject: Reply with quote

perhaps someone can give me some advice as well. I have an intel SSD in my laptop and I'm unsure how to make best use of it.
I have a completely stable (no ~amd64) install and kind of like it that way. Currently I have 2.6.31-r10 and ext4 filesystem.
Though, to make good use of the SSD there are several choices and i cannot decide:

1. enable btrfs filesystem (probably unstable) and keep current 2.6.31 kernel.
2. upgrade to kernel 2.6.33 for TRIM (2.6.33 is not marked stable in gentoo yet and most likely has huge unstable dependencies)
3. make my whole system ~amd64 (I do not want that)
4. wait for 2.6.33 to become stable in gentoo (probably takes months)
Back to top
View user's profile Send private message
StifflerStealth
Retired Dev
Retired Dev


Joined: 03 Jul 2002
Posts: 968

PostPosted: Wed Apr 21, 2010 7:40 pm    Post subject: Reply with quote

I don't think there are a lot of depends for the kernel. I think you can just run .23 on current stable packages. Use the -9999 build of btrfs utils. It has some nice goodies in it. ;) Those are the only two packages that you need to unmask as for as I know. Usually the latest kernels are stable. The only unstable ones are the RC ones, so you should be fine. The -9999 ebuild of btrfs utils is not really that bleeding edge either. The repository gets updated very slowly. I think there are more bleeding edge repositories for btrfs.

Cheers. :)
_________________
Nothing to read in this sig. Move along.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Wed Apr 21, 2010 11:21 pm    Post subject: Reply with quote

If your system is used for production, then keep it stable!

The desire would eventually be to go with TRIM. Does ext4 support TRIM?

BTFRS is not ready for prime time yet.

I am running x86_64 2.6.31-gentoo-r6 with XFS on my OCZ drive with no problems since around Thanksgiving 2009, but The firmware I am using in the drive, 1.40, does not support TRIM, but it does hjaave a good background garbage collector, so as long as the drive has some idle time blocks of a few hours every few days, it cleans itself up pretty good. 8)
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
jodel
Tux's lil' helper
Tux's lil' helper


Joined: 28 Sep 2004
Posts: 113

PostPosted: Thu Apr 22, 2010 6:56 am    Post subject: Reply with quote

you were right, I updated to 2.6.33 without any dependency issues.
The only thing is that my console resolution is wrong now, but this is probably a intel Kernel modesetting problem.

I added the "discard" option for TRIM in my fstab and everything is fine.
I'll go back to full stable when 2.6.33 is officially gentoo stable.

thanks
Back to top
View user's profile Send private message
nyda
Apprentice
Apprentice


Joined: 12 Aug 2004
Posts: 183

PostPosted: Thu Apr 22, 2010 3:17 pm    Post subject: Reply with quote

Since BTRFS was mentioned, does it make sense to use it on a USB flashdrive?

I have my home directory along with a lightweight linux installation on a such a drive, using one partition each for linux and /home. When I'm at my desktop-PC I boot from the desktop's harddrive and only mount the /home-partition from the flashdrive, and when I'm at somebody else's PC I can boot off the flashdrive and still use my regular home directory.
Anyway, long story short, it can be rather slow when running completely off the flashdrive. When a process writes a large amount of data to the stick, any reads are delayed for sometimes seconds, which can be quite annoying. Would BTRFS help in this matter?
Back to top
View user's profile Send private message
stalker
n00b
n00b


Joined: 18 Jun 2003
Posts: 41

PostPosted: Fri Apr 23, 2010 10:39 am    Post subject: Reply with quote

As a heads up, I remember reading something not to long ago (perhaps on the btrfs mailing list) that it didn't handle being on a removable drive very well. The individual had used it as the fs for his backups, and when he needed them he couldn't mount them because it wasn't playing nice.

That will get worked out, but until then I won't be using it on removable media.

As for speeds, you can search for benchmarks to compare the fs's. But the underlying fact is that flash media is slow and I can't see btrfs being a first order effect.
_________________
Look behind you...

Think outside the box, give the cat a chance.
Back to top
View user's profile Send private message
nyda
Apprentice
Apprentice


Joined: 12 Aug 2004
Posts: 183

PostPosted: Sat Apr 24, 2010 8:55 am    Post subject: Reply with quote

stalker wrote:
That will get worked out, but until then I won't be using it on removable media.


Ah thanks. I need something 'stable' since the drive contains all my personal stuff.

stalker wrote:
As for speeds, you can search for benchmarks to compare the fs's. But the underlying fact is that flash media is slow and I can't see btrfs being a first order effect.


The average speed would be ok if it wouldn't stall the system while data is being written and an application simultaneously needs to read data. It would help if there was a way to tell the kernel to write larger amounts of data in small pieces instead of one big chunk and regularly check for new data. I've already tweaked the scheduler, but that only helps so much if the drive takes 2 seconds to write one "chunk". Performance would feel much better if it would write less but more often, although the average speed would go down slightly.
Anyway, I'm a bit offtopic now. I just thought I'd ask if this new filesystem would bring any improvements in regard to this problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum