ZFS need help to make right configuration for my file system

Hello everybody. I need help: I have HP proliant ml310e gen8 server with Xeon E3-1220v3 on board and two regular 1 TB sata disks. The server also has 8 GB ECC memory. I disabled integrated B120i controller, and installed FreeBSD 12 on mirrored zfs pool. The pool is:
Code:
 # zpool status
  pool: zroot
state: ONLINE
  scan: resilvered 908M in 0 days 00:00:08 with 0 errors on Sun Apr  7 01:00:31 2019
config:

        NAME           STATE     READ WRITE CKSUM
        zroot          ONLINE       0     0     0
          mirror-0     ONLINE       0     0     0
            gpt/disk0  ONLINE       0     0     0
            gpt/disk1  ONLINE       0     0     0

errors: No known data errors
I also has 250 GB Samsung Evo SSD disk. I'm going to use this server for hosting websites so performance of disk system is matter... Now I need to choose best option for my configuration:
  • buy another 250 GB SSD disk to make a zfs mirror pool and place all critical data on it (like Postgres database and web-data) to access on high speed...
  • use this one 250 GB SSD for ZIL and L2ARC cache..
  • buy hardware RAID controller like HP P420 with 1 GB cache and build RAID1 UFS filesystem and reinstall OS on it (zfs will not be used at all)
Could you give me some advice for my configuration?
Thanks in advance.
 
Last edited by a moderator:
You could actually keep your HDD configuration and add the SSD as a caching device. This should make frequently accessed files very fast.
You need to check if 250GB is enough - it depends on what content are you going to be serving and the usage patterns.
If the SSD is not enough, then you could add another 250GB SSD as an additional cache.
I would not put them in a mirror - it would be a waste of resources. Having two cache disks seems more flexible and better utilized.

This is how you could add a cache to your mirror:
zpool create pool mirror gpt/disk0 gpt/disk1 cache gpt/ssd0

I think it should be possible to add a cache to an existing mirror.
zpool add zroot cache ssd0 ssd1
 
Also adding more RAM would obviously speed things up - you'd have more content cached. You need to check what your usage patterns are going to be.
 
Don't use a hardware RAID controller underneath ZFS. It's just a bad idea. Unless it has a heck of a lot of RAM (a lot more than your system), and that RAM is non-volatile (so it is a write cache), in which case it makes sense for performance reason.

In addition to roccobaroccoSC's advice, here is another idea: Use part of the SSD as a boot/root device. Having a really fast disk for booting and OS operations makes the whole system feel faster. The fact that you can restart after a crash or some sys admin operation in a really short time (my server at home takes less than a minutes) alone is worth it. You can partition the SSD, put a small boot/root partition on it (my server at home runs on a 32GB SSD, which is only 20% full), and use the rest for ZFS speedup.
 
In addition to roccobaroccoSC's advice, here is another idea: Use part of the SSD as a boot/root device. Having a really fast disk for booting and OS operations makes the whole system feel faster. The fact that you can restart after a crash or some sys admin operation in a really short time (my server at home takes less than a minutes) alone is worth it. You can partition the SSD, put a small boot/root partition on it (my server at home runs on a 32GB SSD, which is only 20% full), and use the rest for ZFS speedup.
That's a really good idea for a web server. Indeed, if you have to restart it every second counts. It's better to not let your users wait for too long to access your web page.
 
That's a really good idea for a web server. Indeed, if you have to restart it every second counts. It's better to not let your users wait for too long to access your web page.
In that case it's typically a better solution to use a HA setup with net/haproxy for example. You're often better off with two or three smaller servers (to spread the load) than one big server. With two or three smaller servers you can easily take one offline (for whatever reason, hardware failure, software updates, etc). Boot up speed will be completely irrelevant.

Most server hardware spend more time in POST than actually booting. Even if you have really slow hard drives.
 
Sadly, that's true. Fortunately, my machine at home has a very slim POST, and it goes fast (probably because it is an inexpensive motherboard, without many server-class bells and whistles).

But even ignoring boot time, having the root file system on SSD makes the whole system much more zippy, because any management operation goes much faster.

BTW, not disagreeing at all with the HA setup if one is really interested in good uptime. It's a lot of extra work (mostly because the data needs to be shared), but has real benefits.
 
Back
Top