Slow file transfers using ZFS raidz1

Discussion in 'Storage & Backup' started by c.f4, Feb 20, 2013.

  1. OP
    OP
    c.f4

    c.f4 Member

    Joined:
    Jun 7, 2011
    Messages:
    478
    Location:
    4152/Wakeboard
    Thanks for the input guys.

    Yeah that was the only thing I can really assume to be honest. I don't have any Unix machines to test transfers between them - Probably something I'll set up over the long weekend (the last of priorities however).

    It seems FreeNAS is not only picky over the hardware it runs on but also the hardware/software it 'runs over'. I wouldn't mind having a dig at some real network gear some day (upgrading to 10gbe) but really for what it is (just a fileserver & streamer) it does almost fine.

    I'll keep searching and thanks for the heads up Iceman. To Onthax - yes I've already lined up partitions (I think that is one of the tweaks you can do).
     
  2. phreeky82

    phreeky82 Member

    Joined:
    Dec 10, 2002
    Messages:
    9,762
    Location:
    Qld
    Samba is horrible (keeping in mind it's not the devs fault!), you can get good speed over it but you pay the price in CPU utilisation. It makes the use of low power CPUs troublesome.
     
  3. cvidler

    cvidler Member

    Joined:
    Jun 29, 2001
    Messages:
    15,364
    Location:
    Canberra
    Agreed, it is an inefficient protocol. But when you have to support Windows systems it's essential.

    pre-Win7 / 2008 I found more need to tweak the settings on the Windows box to get good throughput rather than the SAMBA side.
     
  4. sub.mesa

    sub.mesa Member

    Joined:
    Jun 23, 2010
    Messages:
    271
    Location:
    Europe
    Please check the following things:

    - are the partitions aligned on 4K boundaries?
    - is the pool optimized for 4K sectors (ashift=12)?
    - are you using CPU polling for the network interface?
    - are you using any special ZFS features like compression or deduplication? You should not be using these on a low-end system.

    If these tips don't work, please boot a ZFSguru livecd and run the benchmark from the LiveCD. The LiveCD has very poor ZFS optimation, but it should already give you higher speeds than 10MB/s. If this is true, perform a regular installation and compare the speed versus FreeNAS. FreeNAS is based on BSD 8.3 while ZFSguru is based on BSD 9.1. This could lead to different performance characteristics.

    Good luck!
    - sub.mesa
     
  5. OP
    OP
    c.f4

    c.f4 Member

    Joined:
    Jun 7, 2011
    Messages:
    478
    Location:
    4152/Wakeboard
    Another update guys - With some interesting results.
    Again... Nothing ideal since it is based on user permissions.
    However I trust that my network is fairly secure and only my computer and the HTPC have 'bulk' access to the CIFS shares.
    Also if anyone 'accidentally' hits CTRL+A & delete - not all is lost. Just many hours of rearchiving :thumbdn:

    Setting my downloads folder on the Fileserver to chmod -R 777 alleviates my need for a cron job to change permission, rename and move files.

    Now, CTRL+X (moving in CIFS terms) yields instantaneous transfers in and out of this folder.

    CTRL+C/V (copying in CIFS terms) whilst not instantaneous results in high thoroughput in and out of this folder - I think I saw 400MB/s+ (I could be wrong though).

    Now this is where my mind gets blown.
    Change permissions to the original (I think it was 640). Can't move files but can copy at an abysmal 10MB/s - Link back to original post.

    So it seems the issue is with permissions? I have no idea what goes on at a baseline level but changing from root rwx to everyone rwx seems to remove the terrible transfer rates I initially had.

    Now I must go and remove the delete button off the keyboard. :D
     
  6. samarium

    samarium Member

    Joined:
    Jun 6, 2007
    Messages:
    476
    If you are after something to protect you from accidentally deleting lots of files, just use snapshotting, either manual it automatic.

    If you delete everything, just roll back to the last snapshot, takes seconds.
     
  7. OP
    OP
    c.f4

    c.f4 Member

    Joined:
    Jun 7, 2011
    Messages:
    478
    Location:
    4152/Wakeboard
    Ahh yes thanks for the heads up. I do have snapshots enabled :thumbup: Hopefully it never gets to the point where I need to come here and ask how to use them :D
     
  8. samarium

    samarium Member

    Joined:
    Jun 6, 2007
    Messages:
    476
    zfs rollback file/sys/tem/name@snapshot-name
     
  9. cvidler

    cvidler Member

    Joined:
    Jun 29, 2001
    Messages:
    15,364
    Location:
    Canberra
    set the samba share to read only.
     

Share This Page

Advertisement: