Running torrent on Bhyve/Docker - will it degrade rest of ZFS pool? Performance considerations?

Status
Not open for further replies.

victorhooi

Contributor
Joined
Mar 16, 2012
Messages
184
Hi,

I have a:
  • FreeNAS 11 instance with
  • 6 x 8TB WD spinning disks
  • Running in RAID-Z1.
  • Serving CIFS clients via Gigabit Ethernet/Wifi.
On the FreeNAS instance, I have a Bhyve VM running Ubuntu 18.04, with a Docker container running qbittorrent (Bittorrent client).

The Bhyve instance is backed by a 300 GB ZVOL (with 32 KB ZVOL block size), formatted as ext4.

I've read that COW (copy-on-write) filesystems have poor performance with BitTorrent. And that apparently turning on pre-allocation on your Bittorrent client will not help.

My question is - if I use the torrent client to write directly to the ZVOL - will that affect other ZFS datasets within the same ZFS pool? Or will it somehow isolate the "damage" (fragmentation?) that the torrent client causes to just that ZVOL?

The plan was to use the ZVOL as a scratchdisk - have the torrent client download the files to that, and then when complete, copy it from the Docker container straight to another ZFS data-set on the same host machine (via CIFS).

Any other caveats/considerations I should be wary of here?

Thanks,
Victor
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If it were me, I would install an SSD and use that for the torrent temporary download location. ARC should smooth out the rest as long as you have enough RAM. L2ARC may also be good for that use case (again, if combined with enough RAM).
 

victorhooi

Contributor
Joined
Mar 16, 2012
Messages
184
Hmm, I do have a 512GB M.2 SSD in there - I believe it's currently being used as a cache (L2ARC) device.

Just to confirm - does have torrent disk I/O actually affect the overall ZFS pool? Or only that ZVOL?

Because if it's just the ZVOL - and when I copy data out of it, it's fine - then I'm happy to just periodically blow away the ZVOL.

For the SSD - I guess I can re-partition, so that part of it is still a cache, and part of it is being used as some kind of native disk for Bhyve? Are the issues with ZFS and torrent no longer an issue on SSDs?

Can you do that kind of partitioning/configuration via the FreeNAS GUI?
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
does have torrent disk I/O actually affect the overall ZFS pool? Or only that ZVOL?
It will affect the pool. ZFS datasets and zvols do not get dedicated portions of the disk.
I guess I can re-partition, so that part of it is still a cache, and part of it is being used as some kind of native disk for Bhyve?
Add the partition as a NEW POOL, DO NOT EXTEND YOU EXISTING POOL WITH THE SSD!. from there setup a zvol and add that to your bhyve VM.
Are the issues with ZFS and torrent no longer an issue on SSDs?
SSDs o not suffer from fragmentation the way spinning drives do as they have no seek time. This is true with ZFS and all other file systems.
Can you do that kind of partitioning/configuration via the FreeNAS GUI?
No. you must partition the device in the CLI but then you should be able to add the partitions to the L2ARC & NEW POOL in the GUI.

On the subject of the L2ARC, you did not mention how much RAM you have, L2ARC is configured, how your Pool is used, or the workload profile. Without this information we cannot provide advise on the best configuration. It is worth saying that in many cases with home workloads that L2ARC will reduce performance especially on systems with limited RAM as the L2ARC is mapped using ARC memory.
 

victorhooi

Contributor
Joined
Mar 16, 2012
Messages
184
Got it - thanks for clarifying the effect on the main pool. Damn - that is unfortunate =(.

Is there any way to undo the damage done to the pool? (I've essentially filled a 300GB disk at this stage, then around 100GB before that).

In terms of the SSD - I assume I need to remove the existing cache (L2ARC), then use some native FreeBSD partitioning commands to split it up into a portion for the new pool, and the portion for the new cache?

What sort of size split do you suggest I begin with?

Sorry, I should have specified - the machine has 64GB of RAM - then 6 x 8TB HDDs (mechanical), and the 512GB M.2 SSD.
 

pro lamer

Guru
Joined
Feb 16, 2018
Messages
626
partition
Does it refer to an actual partition (a partition from a multi-partition disk? Does some cheat need to be done to ZFS to get it work? )
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Just a proper BSD disk slice. One for cache and one for a pool/zvol just for bhyve
Is there any way to undo the damage done to the pool?
just move the torrent files off and live with it. If you cant sleep, copy all data off the pool and move it back all at once.
 
Status
Not open for further replies.
Top