High CPU usage when writing to ZFS cache/Pausing during long Writes


Go to solution Solved by Marc_G2,

Recommended Posts

I set up a new separate cache for one of my shares and went with ZFS.  It's a single drive cache.  Is relatively high CPU usage normal when writing to a ZFS cache?  Apparently, my CPU can't keep up to the point where my large file transfers regularly halt for 5-10 seconds every 30 seconds or so.

My other cache is setup as 2 drive BTRFS.  I haven't had this issue with it.  

 

 

Screenshot 2023-08-08 191116.png

Edited by Marc_G2
Link to comment
5 hours ago, JorgeB said:

Check top during a write, dash graph includes i/o wait.

 

I'm not sure graph you're referring to.   

 

I did some more tests and found the issue only happens after around 25GB of continuous transfer.  Here's a graph of the network activity (1 large file transfer).

During those periods of zero activity, there's 100% cpu usage.  So there appears to be some computations happening that's causing the delays

 

Capture.JPG

Edited by Marc_G2
Link to comment
22 minutes ago, Marc_G2 said:

That doesn't explain why there's frequent pauses during large sequential writes.

The device cannot keep up, you'd need a faster SSD, note that not all SSDs can keep constant high write speed, most infact can't, especially entry level models, an MX500 for example should perform better.

 

 

Link to comment

I'm writing to the SSD at only 100 MB/s.  Under normal desktop usage, the BX500 write speed will drop to 40 MB/s when it runs out of cache (which is 48GB).   It's not normal for it to completely halt.  

I have other SSDs so I'll try a different one.  I'll also see if there's any difference between btrfs and zfs.

Link to comment

Could the ZFS Pools and Array becausing my high CPU spikes and the hard reboots?

 

I notice every time my unraid system spikes my system reboots.  Usually when I am downloading a game on my VM.  In this case Baldurs Gate 3.

 

Is there something I should do?  I feel like my system is rebooting to protect itself just don't know why.

 

image.png.31db8c2db7f2bdefa0d54e00a33155c8.png

Link to comment
2 minutes ago, TCMapes said:

Could the ZFS Pools and Array becausing my high CPU spikes and the hard reboots?

 

I notice every time my unraid system spikes my system reboots.  Usually when I am downloading a game on my VM.  In this case Baldurs Gate 3.

 

Is there something I should do?  I feel like my system is rebooting to protect itself just don't know why.

 

image.png.31db8c2db7f2bdefa0d54e00a33155c8.png

 

Forgot to add I am not overclocking anything system speeds are default.  I have all DIMMS populated with a total RAM give 128GB.  

Link to comment
52 minutes ago, TCMapes said:

Is there something I should do?  I feel like my system is rebooting to protect itself just don't know why.

Yeah reboots like that are usually either due to either power or overheating issues.  If your psu is spec'd plenty high, then I would double check all your connections.

Link to comment
  • Marc_G2 changed the title to High CPU usage when writing to ZFS cache/Pausing during long Writes
  • Solution

I changed the file system of my BX500 SSD to btrfs instead of ZFS.  I then tested the performance by transferring a 50GB file.  There were fluctuations in the transfer speed but it never completely halted like it did when was formatted as ZFS.  The total transfer time was probably about cut in half.  So I'm going to assume the issue has been mitigated.

 

My advice to anyone else to only use drives with good sustained write performance if using ZFS.  Though I haven't confirmed yet whether that would also fix the issue on my system.  

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.