System on SSD

Matthew Dillon dillon at apollo.backplane.com
Tue May 10 13:08:11 PDT 2011


:Hi,
:
:I just bought an 60 GB SSD (OCZ Vertex 2). I want
:to use about 20 GB for swapcache. But I think about
:putting the system also on this SSD. To reduce writes
:I want to disable history keeping and mount the pfs
:with noatime. I also want to move /usr/src and
:/usr/pkgsrc and the build directories to a normal HDD.
:
:Are there any issues to keep in mind? Any suggestion?
:
:Thanks a lot.
:
:Sven

    If you are going to run HAMMER on the SSD then you also have to
    manage the reblocking operation(s) on the PFSs.  I would completely
    disable the 'recopy' function by commenting it out and I would adjust
    the reblocking parameters to spend 1 minute every 5 days instead of
    5 minutes every 1 day.

    Everything else can be left as-is.  You can also leave history enabled.
    nohistory will actually generate more write activity.  Though you do have
    to be careful about the retention time due to the limited amount of space
    available on the SSD, so you might want to adjust the snapshot interval
    down from 60d to 10d or something like that.  History is one of HAMMER's
    most important features, it is best to leave it on for all primary
    information storage.  I usually turn it off only for things like
    /usr/obj.

    Most of these parameters are controlled via 'hammer viconfig <pfs>'.
    You want to adjust the config for each mounted PFS and for '/'.

    --

    In terms of layout you will want around a ~1G 'a' partition for /boot,
    which must be UFS, then I recommend a 32G 'b' swap partition and the
    remainder for a HAMMER 'd' partition.

    I usually leave ~4-8G unpartitioned (I setup a dummy 'e' partition that
    is 4-8G in size which is left unused), assuming a pristine SSD.

    --

    In terms of putting the root filesystem on the SSD and not the HDD, I
    think it is reasonable to do and if you do you will almost certainly want
    to put any heavily modified subdirectories on the HDD.  /usr/src,
    /usr/pkgsrc, possibly also /home and /usr/pkg, but it is up to you.

    Usually it is easier just to use the SSD as your 'a' boot + 'b' swap and
    put your root on your HDD.  You can use the remaining space on the SSD
    as an emergency 'd' root.  The reason it is generally better to put the
    normal root on the HDD is that you don't have to worry about fine tuning
    the space and you don't have to worry about write activity.

    You can still use swapcache to cache a great deal of the stuff on the HDD
    onto the SSD via the swap partition on the SSD.

    Booting w/root on the HDD will be slightly slower but not unduly so, and
    once stuff gets cached on the SSD things get pretty snappy.

    --

    Finally, i386 vs x86-64.  If you are running a 32 bit kernel the maximum
    (default) swap space is 32G.  With a 64 bit kernel the maximum is 512G.
    swapcache works very nicely either way but if you intend to run a 64 bit
    kernel you might want to consider configuring a larger swap space and
    essentially dedicating the SSD to just boot + swap.

    It depends a lot on how much information needs to be cached for all of
    the system's nominal operations.  With swapcache you will universally
    want to cache meta-data.  Caching file data depends on the situation.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Users mailing list