Laptop Multi-HD partitioning advice (ZFS)

Daniel Staal DStaal at usa.net
Wed May 4 23:17:29 UTC 2011


I just got notified my new Thinkpad X220 is on it's way, and I'm thinking 
about the best way to use it.  ;)  Obviously, FreeBSD with ZFS is on top of 
the list.  (De-dup and compression on my space-limited laptop?  Yes, 
please.)

Some relevant vitals (after a couple of upgrades that are also on their 
way):
6GB of RAM
250GB 2.5in HDD
40GB mSATA SSD

I'm planning on installing the patched version of 8.2, with the patches for 
ZFS v28.  My idea at this point is to use the main HDD as the primary 
drive, with the SSD partitioned into a small[1] ZIL-device and a larger 
cache drive.  Since it's a SSD, I don't think disk contention should be an 
issue for that use, and it should speed up both reads and writes.  It might 
even reduce the amount of main-disk use that happens.  (Or at least, make 
it happen in short bursts, and let the drive idle in between.)

I might still upgrade that HDD to something larger than stock.  I could go 
to an SSD there too (and it's on a SATA III connection, so it could be a 
*faster* SSD), but I think I'm more likely to go with more space if I 
decide to upgrade.

Obviously, I'm not afraid of a weird config in this case.  ;)  I'm also not 
trying to optimize hard for space, or for any specific use-case: I tend to 
use a laptop for light-duty when I'm not traveling, then more heavy-duty 
(as well as watching movies, etc) during occasional traveling.  The idea 
here is to let ZFS do the disk optimization.  It'll probably slow down my 
boot times from what could be possible, but I'm hoping ZFS will do things 
like move a movie I'm *currently* watching to the cache drive, and let the 
machine shut down the hard drive.

Two things I'm *not* sure what the best choices for are the swap partition, 
and the boot sector.  Swap could be on the HDD (slow, reduces my apparent 
disk-space), on the SSD (fast, reduces my most valuable disk space), or in 
ZFS (doesn't use dedicated space, but has stability issues under heavy 
load).  Of course I may not ever *need* much swap, as I have a fair amount 
of RAM.  (And I don't care about crash dumps on this box.)

The boot sector doesn't really matter as much; if I go with a dedicated 
swap partition that will probably also hold the boot sector.  Otherwise, 
I'm leaning towards the SSD, as I'm already planning on partitioning that, 
and I'm less likely to pull it out.

Or, of course, there may be other considerations that I've overlooked in 
the rest.  So, I'm looking for wisdom, or other thoughts people have.  ;)

Daniel T. Staal

[1] As per:
<http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide#Separate_Log_Devices>
ZIL devices will never use more than 1/2 of RAM, at absolute max, and in 
most cases will use significantly less.  Fully upgraded, this machine 
supports 8GB of RAM, so a 4GB ZIL device would be plenty in all cases, and 
would probably be overkill.

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------


More information about the freebsd-questions mailing list