[FreeNAS] Slow Transfer speeds. Trying to pinpoint bottleneck.

I have a FreeNAS system running on the 7.1 FreeBSD Release kernel. I have tried everything I can think of short of re-compiling the kernel to solve the issue im having.

Currently, My problem is this:

When transferring a file off of a particular hard drive the read speeds are only about 4-5MBps. This is not consistent with the data provided by diskinfo. However, when I use gstat it shows the drive is 100% busy. The filesystem on the drive is formatted with UFS, so I don't think its an odd filesystem issue. Here are the outputs of the varying utilities. I know I can transfer at full speed because when I transfer from my ZFS array, I can hit 30-40MB/s over my gigabit ethernet. When transferring files internally on the machine I am able to hit the 30-40MB/s mark but whenever I use a piece of software (FTP, SMB, RSYNC, NFS) to transfer the data off to a remote machine anything that is not based in memory slows to 5MBps.

Any Idea's? Here is the output from some utilities.

Code:
ad2: 238475MB <Seagate ST3250820A 3.AAF> at ata1-master UDMA100

Code:
root@hangar [/mnt/ds/Backups]# gstat
dT: 0.006s  w: 1.000s
 L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
    6    172    172   2754   33.1      0      0    0.0   90.5| ad2
    6    172    172   2754   33.3      0      0    0.0   90.5| ad2p1


Code:
root@hangar [/mnt/ds/Backups]# diskinfo -t /dev/ad2
/dev/ad2
        512             # sectorsize
        250059350016    # mediasize in bytes (233G)
        488397168       # mediasize in sectors
        484521          # Cylinders according to firmware.
        16              # Heads according to firmware.
        63              # Sectors according to firmware.
        ad:9QE71EY0     # Disk ident.

Seek times:
        Full stroke:      250 iter in   6.349103 sec =   25.396 msec
        Half stroke:      250 iter in   4.752207 sec =   19.009 msec
        Quarter stroke:   500 iter in   7.388453 sec =   14.777 msec
        Short forward:    400 iter in   3.035732 sec =    7.589 msec
        Short backward:   400 iter in   3.630779 sec =    9.077 msec
        Seq outer:       2048 iter in   0.298372 sec =    0.146 msec
        Seq inner:       2048 iter in   0.308258 sec =    0.151 msec
Transfer rates:
        outside:       102400 kbytes in   1.478350 sec =    69266 kbytes/sec
        middle:        102400 kbytes in   1.605518 sec =    63780 kbytes/sec
        inside:        102400 kbytes in   2.626806 sec =    38983 kbytes/sec

Code:
/dev/ad2p1 on /mnt/data (ufs, local, soft-updates, acls)

Code:
root@hangar [/mnt/ds/Backups]# uname -a
FreeBSD hangar.home.n7fly.net 7.2-RELEASE-p7 FreeBSD 7.2-RELEASE-p7 
#0: Tue Mar 30 14:29:50 JST 2010     root@fbsd7.freenas.local:/usr/obj/freenas/usr/src/sys/FREENAS-i386  i386

Code:
root@hangar [/mnt/ds/Backups]# ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:1e:2a:c1:60:d9
        inet 192.168.1.90 netmask 0xffffff00 broadcast 192.168.1.255
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active

Code:
root@hangar [/mnt/ds/Backups]# netstat -i
Name    Mtu Network       Address              Ipkts Ierrs    Opkts Oerrs  Coll
re0    1500 <Link#1>      00:1e:2a:c1:60:d9 22032530     0 47139662     0     0
re0    1500 192.168.1.0   hangar            22022003     - 47132580     -     -
vr0*   1500 <Link#2>      00:e0:4c:c9:46:76        0     0        0     0     0
lo0   16384 <Link#3>                             102     0      102     0     0
lo0   16384 fe80:3::1     fe80:3::1                0     -        0     -     -
lo0   16384 localhost     ::1                      4     -        4     -     -
lo0   16384 your-net      localhost               98     -       98     -     -
 
Actually, I think this is a filesystem issue. I'm going to tinker around with the filesystem and see what I can get out of it.

Thanks!
 
It must be a filesystem issue. I correct a statement in my origional post:

When transferring data from this drive internally to another drive the read speed is only about 4MB/s. I can't figure out for the life of me why this drive is performing so slowly even though it is in perfect health.
 
I'm curios if you worked this out. I just recently built a freenas box and everything was going well till I encountered this same problem. I've got a 4 disk zfs array which works well with 30-40MBps transfer, but then I added a single UFS disk thinking it would be faster and would be fine to stream media from. Strangely enough I get slow enough read speeds that video stutters and even transferring from the UFS disk to the ZFS array I only get 4-5MBps. I'm baffled. In the end I might just clear the disk and reformat it as its own ZFS pool and see if that picks up the speed.

Anyway if you made any headway please post.

Thanks.
 
I was never able to figure this out. I ended up moving the data to the ZFS pool. The idea was this drive was going to be used for frequent I/O to keep me from spinning up the ZFS pool or leaving it running all of the time.

I have no clue what is causing it, odds are it is an issue with the way FreeNAS handles I/O. Since it runs the stock FreeBSD 7.2 Kernel I don't know what changes would have been made that could affect I/O that badly. I've tried FreeBSD on the same box and it has 20-30MB/s transfer but as soon as I switch to FreeNAS the speed drops to 3-5MB/s It has to be a problem with FreeNAS but I haven't been able to find anyone having the same problem till now.

To clearify, what hardware is your FreeNAS box running, mobo, ram, cpu, and such. My guess is there is a common factor in the hardware that may be triggering a timing problem in the kernel causing it to take forever to complete an I/O process. However, this doesn't make sense either because the I/O Wait would not increase from 0. Which indicates that the kernel isn't getting backed up with data requests.

I am at a loss for what would cause that amount of performance degradation.
 
Its funny, the reason I had the second drive was the same, to save my z-pool from working. Here are my Freenas' specs:

Freenas 0.7.1 Shere (revision 5094)
amd64-embedded on AMD Sempron(tm) 140 Processor
2gb ram
biostar A785G3 mobo
the suspect hard drive is running off an ide to sata card but I dont think thats the problem

From what I understand Freenas/FreeBSD has some problems with certain AMD motherboards. I had a tremendous amount of hair pulling trying to install freenas from a CD and eventually went straight to a thumb drive. Only later did I find out that certain AMD boards would half boot and then dump their IDE connections. I wouldn't be surprised if your on an AMD board too and this is just the symptom of another incompatibility.
 
Back
Top