DragonFly BSD
DragonFly users List (threaded) for 2011-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: System on SSD


From: Sven Gaerner <sgaerner@xxxxxxx>
Date: Wed, 11 May 2011 21:56:08 +0200

On Tue, May 10, 2011 at 01:05:28PM -0700, Matthew Dillon wrote:
> 
> :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
>
Thanks a lot for the detailed explanation and hints below. This helped a
lot.
 
>     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.

I think my description was not quite correct. I do not thought of using
the nohistory mount option. Instead I wanted to configure the pfs to
avoid storing the history like it is done for /usr/obj. I think it might
not be necessary as the binaries are changed less frequently.

>     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.

You're right, it is a pristine SSD and I actually planned to leave 10 GB
unused on it. My space consideration was similar but I have kept /boot
smaller, maybe too small.

>     --
> 
>     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.

That was also the idea, moving all frequently changing directories/pfs
to a HDD. About 20 GB is also very small for the system, build
directories and home.

>     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.

It is just my workstation. I'm just interested in trying swapcache and
an SSD. I tried DragonFly mainly to use HAMMER to get a simple and easy
backup solution using the mirror-stream command. So the next step is to
get an idea of swapcache. But I thought 50 GB for swapcache on a
workstation is wasted spaces on the SSD. That's why I wanted to put the
system on the SSD too, to see if this will speed up things more.

After reading this I think I will start with swapcache first and leave
space for the system. Then put the system on the SSD and try to get some
details if this speed up things more.

Thanks a lot.

Sven




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]