Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Feb 2012 16:10:48 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Alexander Best <arundel@freebsd.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: freebsd-swap on ssd
Message-ID:  <4F3E6DF8.30605@quip.cz>
In-Reply-To: <20120217142745.GA68510@freebsd.org>
References:  <20120217141607.GA63659@freebsd.org> <20120217142745.GA68510@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Best wrote:
> On Fri Feb 17 12, Alexander Best wrote:
>> hi there,
>>
>> putting a freebsd-ufs partition on an ssd isn't recommended, since the ufs
>> structure (unlike zfs e.g.) requires certain data to be continuously written to
>> a fixed location and thus will cause the ssd to quickly run out of write-cycles
>> and die.
>>
>> but how about using a small ssd (approx. 10GB) as one entire freebsd-swap
>> partition? will this make more sense, or are there certain structures within
>> the freebsd-swap partition type, which also need to be continuously written to
>> a fixed location?
>>
>> another question i'd like to ask: are there also issues with read-cycles on
>> ssds? because i was thinking about putting a freebsd-boot partition on an ssd
>> drive and only mounting it ro. this should solve the write-cycle issue in
>> theory. however i'm not sure, if stuff like the dirty bit or the ufs label will
>> also remain untouched. so even though the partition will only be mounted ro,
>> freebsd might still frequently write certain data to a fixed location on the
>> ssd drive which hosts the freebsd-boot partition. if this is the case, is there
>> a way of completely prohibiting any writes to a disk? will revoking any write
>> permissions from the device entry under /dev guarantee this, or is using a any
>> device 100% ro under freebsd impossible (unless it has a hardware switch to
>> forbid writes)?
>
> i'm sorry, if i was unprecise here. what i meant was to have a ssd drive with a
> freebsd-boot partition on it (which of course cannot be mounted) and an extra
> freebsd-ufs partition with the contents of / on it, which is the partition i'd
> like to only mount ro. so again the question is: will this configuration
> (freebsd-boot and freebsd-ufs (ro) partition) ensure that no writes to the ssd
> are being performed?

I am not sure, because I am not a developer, but we are using similar 
setup with USB flash disk drive on our backup storage. USB flashdisk 
contains boot and / (root partition) including /home, /usr, /usr/local 
directories with UFS mounted as read only. Other things (/var, 
/usr/ports, /usr/src) are on ZFS pool storage. I remounted USB flash 
disk read-write for system / packages updates only.

The machine is in production for more than 3 years. First flash disk 
died during perl upgrade (lot's of writes) after one and half year. It 
was really cheap USB flash disk with bad performance from start. Then it 
was replaced with slightly better 2GB USB flash disk which is running 
fine. So I think if we are able to run it on cheap ($15) flash disk, you 
will be fine with SSD even if there are some writes.

Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F3E6DF8.30605>