-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory consumption beyond zfs_arc_max with dedup enabled #2083
Comments
So in your c_max 4 12884901888 size 4 12327222416 .. and from your For slow speeds do remember that dedup is hell on memory usage and thrashing is to be expected on deduplicated data. It's important to note that right now there's a lot of overhead and fragmentation in the memory handling subsystem. ZFS thinks it's staying under the limit but could exceed it. Flushing ZFS hard by exporting the pool and/or unloading the module will clean it out thoroughly. ZFS is tested pretty extensively and we don't think there are any actual leaks in it. There is a fair amount of overhead in the DDT allocations specifically which will be improved dramatically in 0.6.3. You can get the effects immediately by using the Git version (warning: kernel and userspace tools versions must match or you'll get all kinds of weird errors), or if you want to try patching ZFS yourself see #1893 or ecf3d9b. Add |
ZFS not exceeding the ARC setting, but the memory still being used, is exactly what was worrying me. Thanks for the info about fragmentation! |
0.6.3 will be released when all the issues are addressed. You can't put a date on stuff like that. ZFS is kept in as close to a "good to release" state as possible. Every commit goes through a test suite at LLNL. I'm running the Git version on the workstation I'm typing this message on right now (give or take a couple of weeks worth of commits). |
just test dedup for my backup dataset on last week's git version, I don't experience any memory issue, but hit by heavy random i/o brought by dedup, rsync from backup dataset to dedup test pool got only 7mb/s after it reach 100GB mark, even I didn't get caught by memory issue, http://christopher-technicalmusings.blogspot.tw/2011/07/zfs-dedup-performance-real-world.html |
Interesting issue - i'm seeing the same behavior in deduplication after ~150G even with SSD ZIL/ARC2 for the target disk and 16G of ARC. I dont think the IO is really random though, just seeking for blocks which may be identical to the one being written. Oracle and IBM have documentation on this, but basically, if remember this correctly, the math is (number of blocks) * 320B = memory needed to dedup all the blocks. Given these numbers, it actually gets impractical pretty quick, and we have memory demons running around under the SPL floorboards to make this a real party. |
I've been experimenting with ZFS 0.6.2.1 on a machine with Ubuntu 12.10, 32GB RAM (non-ECC, production system will have ECC) and a 2x2TB Linux-managed RAID1 (will be moved to RAIDZ1 for production). I just created the tank on the 2TB soft-RAID1 device, enabled compression and dedup and stored a few 100GB of data. I got a dedup ratio of about 3.5x but there was no free memory left at all, the system became unusable. Restarting the system, everything seemed fine, then I wrote a few GB of data, same thing.
AFAIK
means that the table should only take about 90MB of memory, so I don't get what's happening. I have the same setup on an identical server without dedup and that one seems to work fine.
I then set zfs_arc_max to 12GB and it happened again. After restarting the server and mounting the volume:
and arcstats
Played around a bit until ARC hit vfs_arc_max (12GB):
and free -m showed what was to be expected. But, playing around some more led to the system becoming unreasonably slow (minutes to copy 1GB) and
Unmounting the ZFS volume and unloading the kernel module frees up all the memory...So to me, it really looks like some sort of memory leak: zfs_arc_max is set, and arcstats says this limit is observed (see below), but ZFS somehow continues to eat up memory.
Is this behavior expected? Are there more limits I can/should set?
The text was updated successfully, but these errors were encountered: