ZFS Newbie: FreeBSD install Root on ZFS

My question is about atime. I have read numerous sources that indicate atime=off is a performance enhancement. Since the device I am creating is primarily a squid proxy server they also recommend "atime=off" for their associated caches and data.

Starting here Root On ZFS and continuing with Installing FreeBSD Root on ZFS (Mirror) using GPT I see no reference to atime until this section of the first web page: "2.3. Alternate /etc/fstab". Researching the zfs create there appears to be a option "-o atime=off". I am unsure how to completely implement the "2.3. Alternate /etc/fstab" option as it appears to require adjustment of the internal operation of ZFS itself not to mount it's own datasets (I believe that is the correct term.)

My inclination is to include "-o atime=off" in zfs create and stick with allowing ZFS to mount it's own datasets even though the /etc/fstab solution is more familiar to me. (I believe I understand correctly that the root pool does require an /etc/fstab entry when option "2.3. Alternate /etc/fstab" is not chosen.) I have read most of: Advice on what properties should be considered BEFORE creating a pool and datasets? and it seems to support the "atime=off" setting.

If my inclination is valid would including at least a note about optionally including "-o atime=off" in pages with the following command zfs create be potentially helpful to others?

Thanks
 
Just use the installer, both wiki articles are pretty old and still stem from a time the installer wasn't able to install on ZFS. atime is off by default.
 
Once your system is up and running, do "zfs get atime <file system name>". The file system name is likely zroot, if you haven't created any more ZFS file systems. If it is not off, you can turn it off with "zfs set ...".

Have you looked at the FreeBSD handbook whether it has any information about ZFS installs and the atime question? The handbook tends to be updated pretty carefully, while older Wiki pages may be out of data. But if those Wiki pages are indeed outdated (have wrong information), then it would be good to contact someone to let them know.
 
Just use the installer, both wiki articles are pretty old and still stem from a time the installer wasn't able to install on ZFS. atime is off by default.
The script /usr/libexec/bsdinstall/zfsboot has "one" exception: /var/mail atime=on

I'd say its debatable if you want to use it for select other cases like ccache; without knowledge of when a file was last read then the cache becomes a cycle of first in, first out. With it on it can delete the least recently used (was it only v4 that does this?) but atime means every read causes a write (some "may'" be grouped) and if that zfs data is not on fast ssd media then it means a fragmented read (another seek) for every record you have to seek off to. A decent size cache will have atrocious performance just reading a directory listing with its fragmented layout from atime updates and from manually ran cleanup (automatic cleanup is still broken for zfs). You can work around that by periodically replacing the cache with a non block-cloned (and non deduped?) copy...or just shrug your shoulders and leave atime off for it to have a less effective but much faster cache. I'll care more when the ports tree stops extracting new versions of the same software into a directory path with the version number in it since ccache by default won't match anything to that new path.
 
I'm not sure yet but I may not be using that dataset. Thanks for the heads up if I see it being used.
Think about this. /var/mail is a top level for where mail gets saved. In your mail program, messages are sorted/highlighted by "time".
What is "atime"? Access time.

Having atime=on for a mail dataset makes sense because every single mail program (MUA?) presents messages/does things based on time.
Has this message been read? Let me check the last access time and compare against "nowtime". Oh, atime is off? Guess the message hasn't been read.

atime can be a performance tweak, but one really really needs to understand what it is and what it affects.
 
I do not host my own e-mail. I doubt that directory will be all that active. But as I said thanks for the heads up. I will be reviewing that situation.
 
Just use the installer, both wiki articles are pretty old and still stem from a time the installer wasn't able to install on ZFS. atime is off by default.
I have pursued the standard install course; I thought the thanks conveyed that but it appears I was wrong.
 
Back
Top