Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSD, partition scheme...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Thu Jun 10, 2010 8:31 pm    Post subject: SSD, partition scheme... Reply with quote

Hello!
I am planning to use a ssd drive/64gb for my gentoo.
Now I am wondering, if my old partition scheme makes sense with an ssd too.
Right now, I have different partitions for
-ccache
-portage
-distfiles
-boot
-root
-home
Does it make any sense to use a similar scheme on ssd? I read that fragmentation is no problem?
That was one of the main reasons to split portage and ccache into seperate partition, as thes consist of may small files.
The root/home splitting is purely for backup/convenience reasons, as I sometimes nuke my system :)
So, what are your thoughts on this? Anything I maybe forgot? Reiserfs seems a decent fs choice?
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1139
Location: Sofia/Bulgaria

PostPosted: Thu Jun 10, 2010 8:39 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-t-828737-highlight-aligning.html :wink:
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Thu Jun 10, 2010 8:59 pm    Post subject: Reply with quote

Yeah, read that.
Orbiting Jupiter with some other guys :wink:
No really, I think my questions are a "bit" more generally...
Like, will give extra partitions to portage, ccache will wear out the disk faster, or does it make sense at all.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
bcward
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2007
Posts: 89

PostPosted: Fri Jun 11, 2010 12:51 am    Post subject: Reply with quote

I just built a system with an intel x25-m g2 and I put /var/tmp/portage in a tmpfs. Additionally, I added

Code:
CCACHE_DIR="/var/tmp/ccache/"


to my make.conf, and then I mount a separate tmpfs for ccache. Between putting these two directories in memory and upgrading to an SSD I have noticed a considerable improvement in performance, particularly in portage. For perspective, I built kde4.3 in 5.5 hours on a 2.7ghz core 2 duo with 8gb of ram.

If you have the ram I would recommend each of these partitions.

As far as additional partititions go, I have lvm volumes for my music, videos and home directories, all of which reside on a traditional HDD.

Don't know if this is the ideal setup or not, but I've been pleased with it.
Back to top
View user's profile Send private message
broken_chaos
Guru
Guru


Joined: 18 Jan 2006
Posts: 370
Location: Ontario, Canada

PostPosted: Fri Jun 11, 2010 1:02 am    Post subject: Reply with quote

What model of SSD is it? Some of them have much more effective wear levelling (like most of the Intel models) than others, meaning you can be a lot less careful about write/rewrite cycle and still get a fairly long lifespan out of it (some metrics say 5+ years on fairly heavy data loads for a good MLC flash drive).

Does the firmware on it support TRIM? If it does, you're best off using ext4 and 2.6.33 or higher with the 'discard' mount option. I think btrfs may also support TRIM, but I've heard it's, in general, still not stable enough for everyday usage (and probably is overkill on a desktop/laptop anyway). Remember to mount with noatime (unless you really, really, really, really need atime, in which case use relatime -- you probably don't need this, though). Also, don't use data=writeback if you want TRIM to work -- there's a bug that doesn't let it work! There are some more ext4 tweaks that can 'align' the data a little more, by making use of some RAID-intended features of ext4 -- see about halfway down this page, under "Filesystem Alignment". These tweaks are more important on lower-end drives with poor wear levelling, as it lets the filesystem do some of the work there.

As far as separate partitions go, it depends on the model. If it, as I mentioned before, has good wear levelling then splitting it up shouldn't affect the lifespan terribly significantly. If the wear levelling is poor, splitting it up may cause those sections of the drive (that are (re)written extremely often) to fail sooner than other segments.

An option for /usr/portage is to use the various squashfs (+unionfs/aufs) scripts that are around (or putting it on a mechanical drive or NFS share, if possible). I'd consider disabling ccache entirely (unless the performance hit is too great -- probably depends on your processor), if it is your only drive -- put it on a mechanical drive, if available, though (edit: or a tmpfs mount, as suggested above). If you have sufficient RAM (3-4GiB+?), I'd also put /var/tmp/portage on a tmpfs mount -- probably one with 1.5-2GiB of space is sufficient for anything but compiling OpenOffice (use openoffice-bin, if you need it). Same deal with /tmp, though that doesn't need anywhere near as much space as /var/tmp/portage.

Oh, and don't use swap, unless you have a tiny, tiny amount of RAM (or a mechanical disk to put your swap partition on).

There are also some per-application tweaks that would help, particularly if the drive's wear levelling/write amplification is poor -- like telling Firefox to not fsync multiple times for every page load (set toolkit.storage.synchronous to 0 in about:config -- note that this can lose any session data if you have a crash, like history or newly-saved passwords!). It may also help to put some application caches (again, like Firefox) on tmpfs -- such as by using tmpfs for /tmp and setting Firefox's browser.cache.disk.parent_directory to '/tmp'.

I'll be doing a Gentoo install to an SSD in a week or so, so I've been doing a bit of research. ;-) If you want some more tweaks/suggestions after I've done that, I'll be sure to post back with them.
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Fri Jun 11, 2010 4:40 am    Post subject: Reply with quote

Well, it's a Crucial M225 64GB, 2.5", SATA II (CT64M225) drive, which got decent reviews.
It should support TRIM and has 5 years warranty :)
I use tmpfs for /var/tmp/portage & /tmp since many years.
As this is mounting those dirs into RAM, what's the point putting ccache dir also to tmpfs?
My understanding is, that ccache is only usable when recompiling things often (which in fact on a ~amd64 system happens quite often).
As for the file systems, someone suggested using reiserfs with the mount option "barrier=flush".
Would that make sense? I like reiserfs a lot and use it on my hdds for many years, without ever having problems.
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
broken_chaos
Guru
Guru


Joined: 18 Jan 2006
Posts: 370
Location: Ontario, Canada

PostPosted: Fri Jun 11, 2010 5:24 am    Post subject: Reply with quote

Martux wrote:
It should support TRIM and has 5 years warranty :)
[...]
As for the file systems, someone suggested using reiserfs with the mount option "barrier=flush".
Would that make sense? I like reiserfs a lot and use it on my hdds for many years, without ever having problems.

As I said, ext4 and btrfs (hmm, and maybe nilfs) are the only Linux filesystems which support TRIM currently. I doubt ReiserFS will be updated to support it for some time, if ever. TRIM is quite useful (essential, even) in keeping an SSD in good shape, as far as read/write speed goes, as well as sometimes helping with wear levelling -- if your drive supports it, you really should use it. So I'd really suggest ext4 with 2.6.33+ (as btrfs and nilfs probably aren't ready for general usage yet), with proper mkfs/mount options to align it and use TRIM.

Martux wrote:
I use tmpfs for /var/tmp/portage & /tmp since many years.
As this is mounting those dirs into RAM, what's the point putting ccache dir also to tmpfs?
My understanding is, that ccache is only usable when recompiling things often (which in fact on a ~amd64 system happens quite often).

ccache is used when compiling identical source files. If you're emerging a new version of something, there's a pretty good chance there'll be a large number of cache misses, though that depends on how much of the code has changed. Putting it in tmpfs allows some possible speed increases when recompiling things multiple times in rapid succession, or if some source files are used multiple times (or shared between multiple packages).

One downside to keeping it on your SSD is that it does write a large number of small files to your disk (which can be a big problem on some SSDs, depending on how they wear level). I also don't know how often it deletes or rewrites them -- if it deletes and rewrites often, that's bad. SSDs are fine at writes and (particularly) reads, but deletes (which a rewrite is a delete and write cycle) reduce their lifespan.

Oh, and with respect to a distfiles partition, I wouldn't bother on an SSD. distfiles is mostly filled with a large number of big files (certainly big compared to /usr/portage, anyway!), so any sort of fragmentation is usually minimal, compared to the rest of the system.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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