ZFS zfs deduplication vs. overall responsiveness

Hi, we have a DigitalOcean VPS used as a staging environment for our Postgres database. Usually there are around 10-15 copies of the nightly DB dump restored there and used at the same time. ZFS dedup does a great job reducing disk-space requirements by many times. But when there's heavy disk activity, when the dumps are being restored, or old databases get dropped, performance falls on its knees. Responsiveness freezes for as much as 5-20 seconds, both in an SSH session in response to commands, and for DB queries. Are there any zfs knobs regarding dedup performance I can tune? I've tried some of them, none seem to be helping at all. Both dedup+lz4 compression are enabled. Same thing without dedup works fine in terms of interactivity & overall responsiveness. The code is probably not very well worked out & is somewhat buggy with regard to its performance.
 
Dedup uses a lot of memory, the rule of thumb is 5GB of RAM for every 1TB of storage. Which begs the question, how much storage and how much RAM is there?
 
Yeah, I've read about that. There's enough free memory available, so it's by no means a bottleneck. Current usage, shown by top:

Code:
Mem: 6992M Active, 1664M Inact, 457M Laundry, 5014M Wired, 1799M Free
ARC: 2055M Total, 663M MFU, 1098M MRU, 817K Anon, 44M Header, 249M Other
     1560M Compressed, 2826M Uncompressed, 1.81:1 Ratio
Swap: 9216M Total, 1800M Used, 7415M Free, 19% Inuse

About 455G of db zfs FS used, as shown by df, which doesn't take dedup into account. Total 247G out of 320G disk space really used, as shown by zpool list (which does take dedup into account). Current dedup ratio: 2.57x
 
Back
Top