PC-BSD: Ticket #704: ZFS and heavy resource utilization http://trac.pcbsd.org/ticket/704 <p> PCBSD with zfs has high resource (processing and memory) utilization and has been the target of multiple user complaints on web forums. The canned answer is usually with regard to kernel memory allocation (mem_wire, mem_active, mem_inactive, and mem_cache) for optimal performance and that unused memory is wasted memory. </p> <p> The complaint is not due to kernel maximizing memory allocation, it's with respect to mem_active memory being considerably higher than if a ufs or a Linux ext3 or 4 file system were being used. ZFS has an inherently higher mem_active memory utilization due to the arc algorithm and sha256 checksum operations on hard drive reads. Increasing the zfs cache puts a higher load on mem_active and decreasing zfs cache puts a higher load on the processor, even at idle. This may lead to a certain level of dissatisfaction with regard to system performance and give PCBSD a poor reputation. I've noticed 100mb of mem_active being used on a headless PCBSD/zfs installation, which is far higher than a normal 20mb with ufs. I've also witnessed 50% processor utilization when the system is idle with a core2quad processor. </p> <p> The proponents of zfs stipulate the data integrity advantage it has with respect to ufs, ext4, and fat32. However, the end user may not recognize this, especially with poor performance. A compromise could be if the default pcbsd installation utilized ufs for system partitions and zfs for user data (/usr and /home). </p> en-us PC-BSD http://trac.pcbsd.org/chrome/site/pcbsd_trac_banner.png http://trac.pcbsd.org/ticket/704 Trac 1.0.1 mjollnirpaul Thu, 07 Mar 2013 11:20:22 GMT http://trac.pcbsd.org/ticket/704#comment:1 http://trac.pcbsd.org/ticket/704#comment:1 <p> 1st: The default checksum is fletcher4 and should need _much_ less CPU than sha256. </p> <blockquote> <p> 1b: sha256 is the default when deduplication is enabled for the zpool. Thus, I guess it's clear why some curious users complain about zfs beeing slow and causing a high load on their system. They are just happy to try out new things w/o looking for information first... ;) </p> </blockquote> <blockquote> <p> 1c: It could be an idea too write a short explanation in the manual/handbook, release notes, maybe even patch the zfs utility to print out a big fat warning about the consequences of enabling deduplication and that the common understanding is that it is nonsense for &gt;99.999% of desktop usage scenarios and needs about 5G RAM per 1T disk space. </p> </blockquote> <blockquote> <p> 1d: This also could explain 50% CPU usage. </p> </blockquote> <blockquote> <p> 1e: Another reason for high CPU load is clearly compression, necessarily if you start scratching the plates on a gzip'ed filesystem the CPU load will go up. gzip-compression is only a good choice for filesystem that are rarely used! </p> </blockquote> <blockquote> <p> 1f: default compression (lzjb) is ok for a rotational HD, questionable on an SDD (i.e. you should think about it, test it, use only for less often used FS, etc) and bogus for SSD that do compression themself. </p> </blockquote> <p> 2nd: The arc size automagically adjusts itself to the systems utilisation, i.e. it shrinks when the system needs more memory for applications or the kernel. This works fine for &gt;99.999% of typical desktop usage. </p> <p> 3rd: Given that "unused memory is wasted memory", 100M active mem on ZFS is 5 times better than 20M on UFS, right? It should be clear that the cacheing scheme of UFS is much simpler and inferiour to an ARC in most usage scenarios. </p> Ticket kris Fri, 08 Mar 2013 17:55:45 GMT status changed; resolution set http://trac.pcbsd.org/ticket/704#comment:2 http://trac.pcbsd.org/ticket/704#comment:2 <ul> <li><strong>status</strong> changed from <em>new</em> to <em>closed</em> </li> <li><strong>resolution</strong> set to <em>wontfix</em> </li> </ul> <p> ZFS is an enterprise grade file-system, and as such will rely more heavily on system resources. The user is welcome to do additional "tuning" to fit their specific needs, but that always has a cost, possibly speed in the case of shrinking the ARC size, etc. I'm not sure I like the idea of doing a hybrid ZFS / ufs install though, there are HUGE advantages to having dedicated ZFS disks, boot-environments, reliability, check-summing, scrubs, adding disks to the pool, etc. </p> Ticket