From: James Hoyt
Date: 19. Mai 2014 at 02:27:36
Subject: [zfs-macos] RAIDZ1 running slow =(

> So I setup a MacZFS RaidZ rather easily and was happy with myself. I had four 
> 3 TB internal SATA drives in a zpool giving me around 9 TB of space.
> jamess-imac:~ sangie$ zpool status murr
> pool: murr
> state: ONLINE
> scrub: none requested
> config:
> murr ONLINE 0 0 0
> raidz1 ONLINE 0 0 0
> disk3s2 ONLINE 0 0 0
> disk1s2 ONLINE 0 0 0
> disk2s2 ONLINE 0 0 0
> disk4s2 ONLINE 0 0 0
> errors: No known data errors
> So I Filled it up with about 5 GBs of data, mainly images and FLAC/music 
> files and everything just drags on it. It takes a long time for files to be 
> listed in finder and when I try to save an image from Firefox, it will just 
> grind and grind while I try to navigate to a folder. I have vmware Fusion 
> setup on my SSD (my main Mac drive) and doing anything on my zpool from 
> Windows (like using MediaMonkey to organize FLAC files on it) uses up 100% of 
> the CPU, freezing up my computer until the moves are done, even when moving 
> around 30 files.

It’s not clear from this what your actual physical / virtual setup is. Are you 
booting to OSX, and running Windows in a VM? Is the entire VM then living on 
the raidz pool?

> Is my zpool okay? What's going on? Is this type of slowness normal or do I 
> have a bad drive? How will MacZFS report to me if a drive in the array goes 
> bad? I installed SMARTReporter Lite and it shows all drives as green. If I 
> have some drives on SATA II and others on SATA III would that affect anything?
> If you want me to run any tests on it, I will do so gladly. Just let me know.
> Thanks!  

I’ve seen precisely this sort of behaviour with vmware fusion when:

1. my SSD was getting worn down (really, I trashed it in 1 year, it was the 
default apple one coming with early 2011 MBP)
2. the host OS & VM doesn’t have sufficient memory to run correctly without 
3. the additional memory within the VM is pulled from a disk swap file, which 
is by default in the same disk location as the VM itself

Anything less than 8GB of RAM is likely to be tight, VMs will of course make 
this more complicated. Some notes on may help.

I found that my SSDs were being worn out with constant running of VMs; I use 
them heavily in my work. The solution I found was to get max RAM in my laptop + 
imac (16 vs 32 respectively), make a zfs based ramdisk with lz4 compression, 
and copy the entire VM into the ramdisk before running it. The copy phase only 
takes a few seconds from SSD, and it gives me a very nice way to “roll back” to 
the previous image when required. I can comfortably run Windows in a 20GiB 
ramdisk that fits inside a 10GiB zpool with compression, even on the 16GiB 
laptop, and allocating 2GiB of ram for the VM itself (10 + 2 for virtualisation 
& leave 4 for all of OSX stuff).

Here’s the zsh functions I use for this.

# create a 1GiB ramdisk
ramdisk-1g () {
        ramdisk-create 2097152

# the generic function for the specific one above
ramdisk-create () {
        diskutil eject /Volumes/ramdisk > /dev/null 2>&1
        diskutil erasevolume HFS+ 'ramdisk' `hdiutil attach -nomount ram://$1`
        cd /ramdisk

# make a zpool backed ramdisk instead of the HFS+ ones above. Main advantage is 
compression. I get at least 2x more “disk” for RAM with this approach.
zdisk () {
        sudo zpool create -O compression=lz4 -fm /zram zram `hdiutil attach 
-nomount ram://20971520`
        sudo chown -R $USER /zram
        cd /zram

# self explanatory
zdisk-destroy () {
        sudo zpool export -f zram

Dave Cottlehuber
Sent from my Couch


You received this message because you are subscribed to the Google Groups 
"zfs-macos" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to