Solved [ZFS] Sometimes slows down a lot

Hi, I have non typical problem IMHO.
On my laptop with 16G RAM I've installed FreeBSD 11-CURRENT with ZFS and encryption.
All encryption is using geli(8) devices and hardware crypto from Intel i5 CPU.

And ZFS is just fast and fine, but from time to time it just freezes (not entire system) but ALL disk related tasks.
For example I'm copying 10G directory from one place to another.
It copies let's say 40 M/s but at some moments progress stops, slow downs to 0 for about 30s and then resumes with the same 40 M/s.
Also when I execute for example df -h or ls on other terminal during that "hung" it does nothing and waits those 30s, then all resumes and all is fine.

Any idea what to do?
ZFS/zpools are all default, the only change is dedup=on.

Best Regards.
 
Last edited by a moderator:
Are you sure you want to use dedup? If your data is not the kind of data that dedupes well you'll end up with a mess very quickly when the dedup data structures that have to be in wired memory blow up in size.

I wouldn't be surprised if your performance problems stem from inappropriate use of dedup.
 
Yeah, it's most likely dedup. The recommendation is around 5 GB of memory per 1 TB of storage if you want to use dedup.
 
So I have 500G disk, and 16G of RAM, and according to Your 5GB/1T I need 2,5G so no memory problem.....
Turned off dedup, and it seems like helped.... but not yet sure, I had a lot of Mac devel work, and only turned on FreeBSD box few times since then.
 
As I said you have to know that your data dedupes well to be able to get any benefit from it. Dedup is a block level system that compares the hash values of each block and blocks that have the same hash value (and are assumed to be identical) are then stored only once. This means that only certain kinds of files dedup well, the best example I can think of is a large number installation image files (for let's say MS Windows) that differ only in few blocks because they are pre-customized for different hosts.
 
So for example I have 5 virtual machines in VirtualBox, two of them are Windowses, There is also Linux, NetBSD and Solaris....
 
What's your pool layout? How many disks, in how many vdevs? Do you have an L2ARC (cache) device? Do you have a SLOG (log) device?

What kind of I/O are you sending to the pool? Mostly sequential? Mostly random? Mostly reads? Writes?
 
Hmm, pool is just from FreeBSD 11 installer, using whole, single disk.
This is laptop.
Typical usage is hmmm... mostly read?
I'm developing software inside VirtualBox, do testing.
Application is Ruby on Rails with Postgres backend.
It is installed native on FreeBSD and also inside VBox Linux.
There is port forwarding for Vbox etc...
Anyway - seems that dedup = off fixed the issue.
I'm wondering why dedup caused such a long hangs.... seems like there is a LOT of memory free (16G) for 500G disk....
Virtiual machines run one at the time, and thy're configured to use from 2 to 4G of RAM.
 
Back
Top