Title

Linux Disk, USB and LAN Benchmarks

Contents

General Running The Programs DriveSpeed Results Log
Disk Drive Results USB and Firewire Disk USB Flash Drives
Revised Version LanSpeed Results Log LAN and WiFi Results

General

The benchmark tests are based on those produced for Windows, where details and results can be found in DiskGraf Results.htm and CDDVDSpd Results.htm. The tests comprise:

  • Writing and Reading Large Files - Five files each of 8 MB, 16 MB and 32 MB are used.
    System is instructed not to cache the data.


  • Writing and Reading Cached Data - Five files of 8 MB are used. Performance normally
    reflects memory speed.


  • Reading Bus Speed - The same data is read repetitively at block sizes between 64 KB and
    1 MB. This normally reads data from the disk’s buffer to show maximum bus speeds.


  • Random Reading Speed - 1 KB blocks are read randomly from 7 file sizes between 2 MB
    and 128 MB. Results reflect the disk's buffer size and rotation speed.


  • Writing and Reading Small Files - 500 files are written, read and deleted at 6 different
    file sizes each between 2 KB and 64 KB. Besides speed, milliseconds per file is provided
    to reflect overheads.


  • Run time parameters - These are provided to write and read larger files and to specify
    the drive and file path to be used.

Besides testing disk and flash memory drives, it was intended to use the (drivespeed) benchmarks for measuring speed over such as Local Area Networks (LANs). In order to avoid data being cached in main memory by the Operating System, the program uses direct I/O (file open parameter O_DIRECT for Linux). This prevented directories being mounted over a LAN, so a second program (lanspeed) was produced, identical except with no direct I/O parameter. Compilations at both 32 bits and 64 bits were produced - drivespeed32, lanspeed32, drivespeed64 and lanspeed64. The lanspeed tests can be used to measure speeds between Linux platforms and also between Linux and Windows systems. A Windows program, drivespeed32.exe is also provided and this can also be used as a LAN speed test.

It was noted that a more modern flash drive was particularly slow and another quite fast. Then, it became apparent that Random Writing could be particularly slow. The latter function was included in a Revised Version and further tests carried out, including using the two new flash drives See below.

The execution files, source code along with compiling and running instructions, can be downloaded in linux_disk_usb_lan_benchmarks.tar.gz (revised). The benchmarks are simple execution files and do not need installing. Details are displayed when the tests are running and performance results are saved in a .txt file. Details of other Linux benchmarks can be found in linux benchmarks.htm. DriveSpeed32.exe can also be found in drivespeed32.zip.

To Start


Running The Programs

Mouse Click - The Linux varieties are provided with script files. Subject to Execute and Write permissions (for test files and log file) being possible, clicking on the script icon provides a menu selection of “Run In Terminal” or “Display”. Running this way is useful on portable drives for maintaining a record of results from various systems.

It seems that the drivespeed programs fail using an NTFS formatted partition, because of that O_DIRECT parameter.

With the drivespeed32.exe file in a Linux shared directory and opened on a Windows based PC, clicking on the icon runs the program under Windows with data written and read over the network to the directory on the Linux system drive.

Terminal Command - The benchmarks can, of course, be run by changing the current directory to the one containing the execution file and using the usual ./program_name command or from the home directory including the path (like ./test/disk/drivespeed64). External devices are mounted in the /media directory. Unless the volume label has been given a suitable name, the external drive will have a convoluted identification name (see example DriveSpeed log below), but this can be copied from the /media listing and pasted as part of the command.

Run Time Parameter - The programs can be run using a parameter to define the file path, for example ./drivespeed64 F test/disk or ./drivespeed64 FilePath /media/new. This runs the program and saves the log file in the current directory, with data on the file path drive.

The other parameter is for file size, for example ./drivespeed64 MB 32 writes and reads 32, 64 and 128 MB large files and eight tests using 500 small ones between 2 KB 256 KB. The defaults are 8, 16, 32 MB and 2 to 64 KB.

Permissions - Being new to Linux, I have difficulty in understanding permissions. I have no problem in running these benchmarks from within my home directory but that is not the case when the programs are on attached drives. The procedures required to force programs to run appear to be different using Abuntu and Fedora, the two systems tried. Example Linux or program error reports or failures are:

  • No such file or directory - No execution permission
  • Shell script fails to run program - No execution permission
  • Free Disk Space not available - No read permission
  • Cannot open results file - No directory write permission
  • Cannot open data file for writing - No file write permission

To help other newcomers, I found some of the following necessary. On connecting an external device, it appears by volume name or ID code in /media. With inadequate permissions, the drive can be unmounted and remounted as shown in example 1 below, the /dev ID being obtained from Disk Utility. Alternatives for file type include vfat, ntfs and ext3 and empty directory /new has to be created beforehand. This provides full permissions and the benchmark can then normally be executed by clicking on the script file or executed by changing directory paths in Terminal. A copy of the benchmark in the home directory can be used to write and read data on the external drive as show in example 2.

Sometimes the benchmark can be run from the home directory, without unmounting/remounting, using Example 3 or 4. In other cases, where the script file fails to execute the program, it can be run from the destination directory as in Example 5.


 1. Home directory - sudo umount /dev/sdb4
                     sudo mount -t vfat -o umask=000 /dev/sdb4 /media/new
 2. Home directory - ./drivespeed64 FilePath /media/new/drivespeed2
 3. Home directory - ./drivespeed64 FilePath /media/6449-7525/drivespeed2
 4. Home directory - sudo ./drivespeed64 FilePath /media/6449-7525/drivespeed2
 5. Destination directory - ./drivespeed64

To Start (More Below)


LAN Benchmarks - The LAN version was intended for use between Linux systems and Linux to Windows PCs. For this, Samba software is needed. Under Ubuntu, this was installed, as shown below, to use smbfs for mounting remote files locally. Then a different procedure was used to install Samba under Fedora This uses the CIFS protocol for file services and can also be used with Ubuntu instead of smbfs.

After Samba is installed, the first step is to create a local folder where remote directories and files are mounted (and viewable). The mounting function requires the remote address. In my case, it was more appropriate to use the IP address, such as 192.168.0.3. The examples shown include (such as dir_mode=0777) for setting permissions and not always needed. Sometimes user=xxx and password=yyy will be required.


 Ubuntu Procedure                     Command

 Install smbfs (and Samba) ---------- sudo apt-get install smbfs
 Load the kernel module ------------- sudo modprobe smbfs
 Create folder for shares ----------- sudo mkdir /media/public
 Define permissions ----------------- sudo chmod 0777 /media/public

 Mount Windows shared drive --------- sudo mount -t smbfs -o dir_mode=0777,
  or cifs intead of smbfs             file_mode=0777 //192.168.0.4/d /media/public

 Change directory ------------------- cd /media/public/Test
 Run program, files in D:\Test ------ ./lanspeed64
 Or from Linux benchmark directory -- ./lanspeed64 FilePath /media/public/Test

 Mount Ubuntu shared directory ------ sudo mount -t smbfs -o user=roy,dir_mode=0777,
  or cifs intead of smbfs             file_mode=0777 //192.168.0.2/all /media/public

 Fedora mount Windows shared drive -- sudo mount -t cifs -o dir_mode=0777,
                                      file_mode=0777 //192.168.0.3/d /media/public

 Note After -o there should be no spaces after the commas between items.
 Also password might be needed -o user=RemoteUserName,password=RemoteUserPassword


To Start


Example DriveSpeed Results Log

Following is an example log file of the 64-Bit version running on a 3 GHz quad core AMD CPU with 64-Bit Ubuntu and using a 7200 RPM eSATA disk drive. In this case, Ubuntu was loaded from a USB flash drive, access to the eSATA disk being via /media.

###############################################################

  Assembler CPUID and RDTSC       
  CPU AuthenticAMD, Features Code 178BFBFF, Model Code 00100F42 
  AMD Phenom(tm) II X4 945 Processor 
  Measured - Minimum 3013 MHz, Maximum 3013 MHz 
  Linux Functions 
  get_nprocs() - CPUs 4, Configured CPUs 4 
  get_phys_pages() and size - RAM Size  7.81 GB, Page Size 4096 Bytes 
  uname() - Linux, roy-64, 2.6.35-22-generic 
  #33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 2010, x86_64 

 ###############################################################

 Current Directory Path: 
 /media/f816ec76-8bf2-4dd3-9e98-62934909a779/roy/all64/drivespeed2
 Total MB   11263, Free MB    9513, Used MB    1750

 Linux Storage Speed Test 64-Bit Version 1.1, Tue Feb  1 14:20:39 2011

                Copyright (C) Roy Longbottom 2011

     8 MB File         1          2          3          4          5
 Writing MB/sec       4.33      76.73      76.15      82.40     105.84
 Reading MB/sec      57.37      86.62      83.40      80.74      82.34

    16 MB File         1          2          3          4          5
 Writing MB/sec      73.94     108.16      72.53     116.19     116.12
 Reading MB/sec      70.39     103.31     120.31     121.53     121.48

    32 MB File         1          2          3          4          5
 Writing MB/sec     113.01      76.67      73.20     115.83     116.05
 Reading MB/sec     105.19     102.41     113.15     121.55     120.59

 ---------------------------------------------------------------------
 8 MB Cached File      1          2          3          4          5
 Writing MB/sec    1271.71    1503.73    1496.38    1493.27    1491.68
 Reading MB/sec    3406.70    4015.11    4079.82    4081.24    4080.77

 ---------------------------------------------------------------------
 Bus Speed Block KB     64        128        256        512       1024
 Reading MB/sec      84.93     102.31     112.31     121.03     116.41

 ---------------------------------------------------------------------
 1 KB Reads File MB >    2      4      8     16     32     64    128
 Random Read msecs    0.43   0.39   0.45   3.01   4.49   5.93   6.69

 ---------------------------------------------------------------------
 500 Files   Write             Read             Delete
 File KB     MB/sec  ms/File   MB/sec  ms/File  Seconds
       2       7.54     0.27     7.67     0.27    0.015
       4      17.19     0.24    22.27     0.18    0.018
       8      20.24     0.40    27.21     0.30    0.017
      16      33.27     0.49    47.16     0.35    0.019
      32      52.67     0.62    67.20     0.49    0.016
      64      55.43     1.18    75.49     0.87    0.015

              End of test Tue Feb  1 14:21:29 2011

To Start


Disk Drive Results

All the following results are from disk drives connected to the quad core AMD CPU that provided the above log file. The first column is from the main SATA disk with NTFS formatting, using the Windows version of the benchmark. Its notable achievements are that it is the only one where the bus test demonstrates SATA 2 300 MB/second and the fastest random access, reading data from its 16 MB buffer.

Results are provided for two drives connected to eSATA. Note that eS1 would not run properly under Windows 7, writing speed being pathetically slow, but there were no problems using Windows Vista on another PC. The disk is a 2009 7200 RPM drive, with a 16 MB buffer, in a SATA 1 external enclosure. The first 12 + 12 GB are Ext4 format (with Ununtu 64), the next 134 GB NTFS and the final 153 GB FAT32. Results are for Ext4 and FAT, using Ubuntu and Fedora. Here writing large FAT files is slower than with Ext4, probably as the last partition has less data per track. Next Ubuntu is the fastest reading cached data and, with FAT, Fedora is slow on all examples of writing cached files. Again with FAT, Fedora is slow writing small files and, with all and 16 KB sectors, writing and reading 16 KB files can be faster than smaller ones.

The second eSATA disk, eS2, is a 250 GB ultra-portable Seagate FreeAgent drive that runs at 5400 RPM via an optional eSATA attachment, and has an 8 MB buffer. Results are also given using the alternative USB attachment. The first half is formatted as FAT32 and the remainder as Linux Ext4. Results are also included for the Windows benchmark using FAT. Performance of the large files is worse using Ext4, with less data per track and the bus is clearly running at SATA 1 speeds of up to 1.5 Gbps. Random access times reflect the disk rotation speed and buffer size. Writing small files is much slower using the FAT partition, Fedora producing the worst performance but, on reading, Windows is slowest with data larger than the buffer.

The USB performance of up to 36 MB/second is limited by bus speed but this does not affect random access times much. On Windows FAT files, unlike the “Enable Write Caching” setting via eSATA for better performance, the default for USB is “Optimise For Quick Removal”. This can be expected to save the File Allocation Table for every file written, producing slow writing speed on small files. Running with “Optimise For Performance”, file transfer time is much faster, similar to Ubuntu FAT speeds. Fedora and FAT demonstrate the “Quick Removal” performance.


                                 Maximum Speeds

 Disk         HD  eS1  eS1  eS1  eS1  eS2  eS2  eS2  eS2  eS2  USB  USB  USB  USB  USB
 Size GB     230  145   11  145   11  119  119  117  119  117  119  119  117  119  117
 OS         Win7 Ubun Ubun Fedo Fedo Win7 Ubun Ubun Fedo Fedo Win7 Ubun Ubun Fedo Fedo
 Format     NTFS  FAT Ext4  FAT Ext4  FAT  FAT Ext4  FAT Ext4  FAT  FAT Ext4  FAT Ext4

 8 MB File
 Write MB/s  110   84  106   81  108   83   81   70   62   67   25   33   33   31   36
 Read  MB/s   84  102   87  102  105   75   82   70   81   67   30   35   35   36   36

 16 MB File
 Write MB/s   89   84  116   76  122   82   81   68   73   70   25   32   34   32   36
 Read  MB/s   88  101  122  101  122   78   82   67   82   70   30   35   35   36   36

 32 MB File
 Write MB/s   97   85  116   81  122   83   80   64   77   69   25   32   35   31   36
 Read  MB/s   91  100  122  101  112   79   82   70   82   69   31   35   35   36   36

 8 MB Cached File
 Write MB/s  1618 1119 1504  628 1318 1900 1114 1556  491 1301   24 1124 1535  491 1304
 Read  MB/s  2517 4077 4081 3318 3709 2106 4085 4037 3728 3712  623 4073 4033 3664 3737

 Bus Speed
 Read MB/s    260  131  121  125  124  127  115  117  119  119   31   34   31   34   33


 Disk         HD  eS1  eS1  eS1  eS1  eS2  eS2  eS2  eS2  eS2  USB  USB  USB  USB  USB
 OS         Win7 Ubun Ubun Fedo Fedo Win7 Ubun Ubun Fedo Fedo Win7 Ubun Ubun Fedo Fedo
 Format     NTFS  FAT Ext4  FAT Ext4  FAT  FAT Ext4  FAT Ext4  FAT  FAT Ext4  FAT Ext4

 Random msecs
    File MB
          2  0.1  0.3  0.4  0.5  0.4  0.5  0.5  0.5  0.5  0.5  0.9  0.6  0.7  0.7  0.7
          4  0.1  0.3  0.4  0.7  0.4  0.5  0.4  0.4  0.5  0.4  0.8  0.6  0.6  0.7  0.7
          8  0.1  0.4  0.5  0.4  0.4  3.7  3.7  3.8  3.9  4.0  4.0  3.8  3.9  3.8  4.1
         16  0.2  2.8  3.0  2.8  2.7  5.3  6.1  5.8  5.5  5.5  5.7  6.2  5.8  5.9  5.9
         32  3.2  4.8  4.5  4.9  5.3  6.4  6.9  6.2  6.8  6.4  6.7  6.8  7.6  6.9  7.2
         64  5.7  5.8  5.9  6.6  6.2  7.1  7.7  8.0  7.2  7.7  7.7  7.7  8.2  7.4  7.9
        128  6.9  7.1  6.7  7.0  7.0  8.1  8.2  8.0  7.7  8.0  8.3  7.8  8.1  8.5  8.5

 Write 500 Files - ms/file
    File KB
          2  1.3  1.6  0.3  9.5  0.4  0.9  1.7  0.4  8.1  0.5  7.9  2.1  0.8  9.2  0.6
          4  0.6  1.6  0.2  9.0  0.4  1.0  1.7  0.3  9.0  0.5  8.7  2.4  0.6  8.1  0.7
          8  0.5  1.7  0.4  7.1  0.7  1.1  1.7  0.5 11.6  0.7  8.6  2.3  1.0  7.4  0.9
         16  0.6  1.4  0.5  5.3  0.7  0.9  1.5  0.5  5.9  0.7  8.7  2.5  1.2  6.9  1.2
         32  0.8  1.6  0.6  6.6  0.8  0.9  1.7  0.8  7.0  1.1  9.5  3.0  1.8  8.0  1.9
         64  1.2  3.0  1.2  7.3  1.2  1.4  3.3  1.7  8.7  1.5 11.9  3.8  5.4 10.1  2.6

 Read 500 Files - ms/file
    File KB
          2  0.7  0.2  0.3  2.2  0.2  1.7  0.5  3.3  2.7  2.7  2.1  0.8  2.9  0.8  0.8
          4  0.3  1.1  0.2  1.1  0.2  1.7  1.6  0.4  2.9  0.3  3.0  0.9  0.6  1.6  0.7
          8  0.5  1.1  0.3  0.3  0.3  1.7  1.5  0.3  1.5  0.6  3.1  1.0  1.0  2.5  0.8
         16  0.4  0.3  0.4  0.4  0.4  1.8  0.3  0.7  0.6  0.7  3.4  1.0  1.7  1.0  1.1
         32  1.1  0.4  0.5  0.6  0.7  2.3  0.5  0.8  0.6  1.0  4.0  1.3  3.3  1.7  1.4
         64  1.0  0.8  0.9  1.0  0.9  3.0  1.0  4.2  1.1  3.5  5.6  2.2  3.3  2.6  2.7

To Start


USB and FireWire Disk

All these results are on a 2008 laptop with a 1.8 GHz Core 2 Duo CPU. Results for the Windows benchmark are via Vista. The first column is for the 5400 RPM laptop drive where, except for bus speed, is no faster than the disk on USB and FireWire.

The other results are for a 7200 RPM disk drive in an enclosure with USB and FireWire connections. The first 30 GB has 32-Bit Ubuntu installed with Ext4 formatting, then 10 GB swap space, and the final 80 GB as a FAT32 partition. The disk is capable of producing a data transfer speed greater than 60 MB/second, but limited by external bus speed.

The Linux operating system used was 64-Bit Fedora, with FAT and Ext4 tests via USB and FireWire. Results via Windows Vista are included for comparison purposes.

Maximum data transfer speed of USB is 480 Mb/second, faster than FireWire at 400 Mb/s. Writing the large files via Windows appears to be faster using FireWire but USB is faster using Fedora. Windows reading speed is again somewhat better using FireWire but little different on Fedora tests. However, repetitive reading from the disk’s buffer in the bus tests indicates that FireWire is the faster on all results shown.

There are significant differences in speed when data can be cached in main memory between Windows and Fedora, also FAT and Ext formatting. Random access times reflect the 7200 RPM revolution speed and the 8 MB disk buffer.

As for the earlier USB disk drive, the Windows tests were run with the “Optimise For Quick Removal” setting, resulting in slow writing speeds, unlike with FireWire. With “Optimise For Performance” the average writing times slowly increased from 1.1 to 3.4 milliseconds but there was little difference on file reading times.

Using Fedora, both USB and FireWire connections were slow writing the small files but both fast with Ext4 format.

                Maximum Speeds

 Disk        HD   FW  USB   FW  USB   FW  USB
 Size GB     71   76   76   76   76   28   28
 OS         Win  Win  Win Fedo Fedo Fedo Fedo
 Format    NTFS  FAT  FAT  FAT  FAT Ext4 Ext4

 8 MB File
 Wrt MB/s    22   25   21   24   26   25   26
 Rd  MB/s    33   35   29   34   33   32   34

 16 MB File
 Wrt MB/s    28   25   19   15   23   16   26
 Rd  MB/s    32   36   29   34   33   29   29

 32 MB File
 Wrt MB/s    26   24   21   23   26   16   26
 Rd  MB/s    31   36   30   33   33   29   30

 8 MB Cached File
 Wrt MB/s    31   31   24  180  246  503  513
 Rd  MB/s   792  756  660 1106 1054 1097 1096

 Bus Speed
 Rd  MB/s   115   39   31   40   36   39   36

 Random msecs
   File MB
         2  0.3  0.3  0.7  0.2  0.4  0.2  0.4
         4  2.4  0.2  0.9  0.2  0.4  0.2  0.4
         8  4.4  1.0  1.6  1.0  1.2  1.4  1.7
        16  6.1  3.8  3.9  3.8  3.6  3.7  4.0
        32  7.5  4.7  5.0  5.0  5.6  5.1  5.0
        64  7.2  5.8  6.1  5.5  5.8  5.6  6.3
       128  8.3  5.9  7.1  6.2  6.1  6.8  6.7

 Write 500 Files - ms/file
   File KB
         2  1.5  0.8  5.6  4.6  5.6  0.6  0.8
         4  0.8  0.8  6.5  5.1  5.5  0.7  0.8
         8  0.8  1.0  6.4  5.3  5.7  0.7  0.9
        16  0.8  1.4  7.6  5.8  7.0  1.3  1.2
        32  1.9  2.2  8.4  7.0  7.0  2.2  1.7
        64  3.3  3.4 10.3  9.8  9.3  5.5  5.3

 Read 500 Files - ms/file
   File KB
         2  3.0  2.1  3.3  1.3  1.7  0.4  0.5
         4  2.5  2.1  3.4  1.4  1.9  0.4  0.7
         8  2.8  2.3  3.7  1.5  1.9  0.5  0.7
        16  3.1  2.7  3.8  1.7  1.6  0.8  1.8
        32  3.7  3.7  5.1  1.1  1.5  2.8  4.4
        64  5.1  6.2  8.3  2.6  2.3  3.6  3.7 

To Start


USB Flash Drives

Flash memory originally had a performance rating where 1 is 0.15 MB/second, the same as that for CD discs (or a rating of 100 is 15 MB/second). Unfortunately, the specifications are not often published. Based on disk drive results, greater than 36 MB/second appears to be as good as it gets on High Speed USB 2.0. Results for large files and bus speed indicate reading speeds of 10 to 28 MB/second, generally reflecting age of the device. These particular devices are much slower on writing, the range being 3 to 9 MB/second, but devices, with writing at a similar speed to that for reading, can be found.

All of these results are from a PC with a 2.4 GHz Core 2 Duo CPU with Windows results via Vista. The latter produces the slowest performance on handling the cached files. Note that random access times are mainly 0.5 milliseconds at all file sizes, much faster than disk drives on the larger files. Examples where the time is much longer also produced around 0.5 milliseconds for all results on other test runs. The benchmarks do not run at the larger file sizes if the time for writing and reading five files has reached more than 60 seconds. Examples are shown below.

The highest variations in speeds are with small files, particularly on writing. Surprisingly, in some cases, average writing times can be less at at larger files sizes and result are mainly consistent on repeating the tests. Reading speeds via Windows are slower than Linux and writing times exceptionally longer. It is known that Windows “Optimise For Performance” option is not available for flash memory on XP and later. With “Optimise For Quick Removal” File Allocation Tables are saved for every file written. This also affects the recorded delete times for the 500 files of at least 8 seconds for the Disgo drive and 14 seconds for the other two (Stap and Cru4). All Linux deletion times are less than 0.02 seconds.


                                 Maximum Speeds

 Drive**       Stap Stap Stap Disg Disg  SD  Cru4 Cru4 Cru4  PNY Cr16 Cr16 Cr16
 Size MB        475  475 3004  489  489 3718   95   95 3473 3567  484  484 8819
 OS             Win Ubun Ubun Ubun  Win Ubun Ubun  Win Ubun Ubun Ubun Fedo Fedo
 Format         FAT  FAT Ext4  FAT  FAT Ext3  FAT  FAT Ext3 Ext3 Ext4 Ext4  LVM

 8 MB File
 Write MB/s       3    3    3    4    4    5    5    4    4    8    4    5    3
 Read  MB/s      10   10   10   11   10   10   19   17   19   23   28   28   28

 16 MB File
 Write MB/s       3    3    3    4    4    5    5    4    5    8    4    5    4
 Read  MB/s      10   10   10   11   10   10   19   17   19   23   28   28   28

 32 MB File
 Write MB/s       3    3    3    4    4    4              4    9    4    4    4
 Read  MB/s      10   10   10   11   10   10             19   23   27   27   27

 8 MB Cached File
 Write MB/s       3  577  928  539    4  515   73    4  523  525  671  754  754
 Read  MB/s    1584 3549 3184 3492 1666 3378 3475 1624 3581 3619 3457 3378 3171

 Bus Speed
 Read MB/s       10   10   10   11   10   10   19   17   18   11   28   26   26


 Drive**       Stap Stap Stap Disg Disg  SD  Cru4 Cru4 Cru4  PNY Cr16 Cr16 Cr16
 Size MB        475  475 3004  489  489 3718   95   95 3473 3567  484  484 8819
 OS             Win Ubun Ubun Ubun  Win Ubun Ubun  Win Ubun Ubun Ubun Fedo Fedo
 Format         FAT  FAT Ext4  FAT  FAT Ext3  FAT  FAT Ext3 Ext3 Ext4 Ext4  LVM

 Random msecs
    File MB
          2     0.6  0.5  0.5  1.0  0.5  0.8  0.5  0.5  0.5  1.4  0.5  0.5  0.5
          4     0.5  0.5  0.5  0.5  0.5  0.8  0.5  0.6  0.5  4.5  0.5  0.5  0.5
          8     0.5  0.5  1.7  0.5  0.5  0.8  0.5  0.5  0.5  4.8  0.5  0.5  0.5
         16     0.5  0.4  2.1  0.5  0.5  0.8  0.5  0.5  0.5  5.8  0.5  0.5  1.0
         32     0.5  0.4  2.1  0.5  0.5  0.8  0.5  0.5  0.5  4.5  0.5  0.5  0.5
         64     0.5  0.4  1.8  0.5  0.5  0.8  0.5  0.5  0.5  1.1  0.5  0.5  0.5
        128     0.5  0.5  2.0  0.5  0.5  0.8            2.3  0.5  0.5  0.5  0.5

 Write 500 Files - ms/file
    File KB
          2   324.0  6.0  7.9 19.0 33.2  4.6 11.9 51.2  3.4  8.3 10.0  8.3 13.6
          4   321.7  9.6  9.6 25.8 34.4  3.7 14.0 40.7  1.8  5.2 14.5 11.7  7.0
          8   325.0 20.1 17.1 29.3 38.6  7.3 13.3 42.6  3.2  3.0 18.6 17.0 13.2
         16   345.4 29.7 33.4 43.0 52.3 19.3 16.2 47.2  6.1  5.8 20.6 19.7 19.3
         32    45.2 18.1 17.0 29.9 38.2 13.6           10.9 15.3 31.1 29.4 23.9
         64    56.4 25.8 33.8 39.6 45.0 35.3           25.6 16.6 12.8 12.7 10.4

 Read 500 Files - ms/file
    File KB
          2     2.6  1.0  1.2  0.7  2.4  0.9  0.6  2.7  0.5  0.7  0.6  0.5  0.5
          4     2.8  0.9  1.3  1.0  2.5  0.9  0.8  2.8  1.2  0.7  0.6  0.6  0.6
          8     3.2  1.4  1.3  1.4  2.9  1.2  0.9  2.9  0.9  0.9  0.8  0.8  0.7
         16     4.1  2.2  2.3  2.1  3.7  2.0  1.5  3.4  1.7  1.3  1.0  1.0  1.0
         32     5.7  3.7  3.7  3.6  5.2  3.2            2.5  2.0  1.5  2.3  1.6
         64     9.2 10.7  7.0  6.4  8.1  6.9            4.4  4.0  2.7  2.6  2.8

 Drive** Stap = Staples 4 GB, Disg = Disgo 512 MB, SD   = Maxell SD card 4 GB
         Cru4 = Cruzer 4 GB,  PNY  = PNY 4 GB      Cr16 = Cruzer 16 GB

To Start


Revised Benchmark

The benchmarks drivespeed32, drivespeed64 and drivespeed32.exe have had an extra test function included to measure random writing speed, when it became apparent that this could be a problem. Results are provided below, including all measurements on a slow flash drive and a fast one driven via both Windows and Linux.

Results from two disk drives, via Linux and Windows, are provided for comparison with USB flash drives. On these, random writing time on larger files is faster than random reading time, probably a buffering effect. The Windows disk is NTFS formatted, avoiding the poor performance when FAT is used.

The fast USB drive is an 8 GB Patriot Rage XT, with quad channels for fast writing speeds. The first three sets of results are via the same PC, where Windows is somewhat faster than Ubuntu on writing large files but slower on reading. Random reading performance is quite similar with random writing time subject to wide variations. Writing and reading times of small files is quite similar with Ext4 and FAT formatting and Ubuntu. FAT formatting under Windows produces slow reading speed of small files and particularly slow writing times, due to “Optimise For Performance” being unavailable, necessitating too frequent updating of the file allocation table. The other tests on this drive, using a different PC and a smaller partition, provide few differences that require explanation.

The slow one is an 8 GB Sigma drive, with extremely slow large file writing times and reading speed half as fast as might be expected, on large files and random access. Random writing times were consistently excessive, at up to 0.3 seconds, on small and large partitions via Windows and Ubuntu. Writing Windows small files was faster in a smaller partition but still much worse than using Ubuntu. Worst by far was using Windows and a single 8 GB partition. Here, more than 2 minutes was needed to write 500 small files and 80 seconds to delete them.


 Drive         HD1  HD2  Pat  Pat  Pat  Pat  Pat  Pat  Sig  Sig  Sig
 Size Bytes    11G 230G   6G   8G   8G   8G 336M 336M   1G   8G   8G
 OS           Ubun Win7 Ubun Ubun WinV Win7 Win7 Ubun Win7 WinV Ubun
 Fornat       Ext4 NTFS Ext4  FAT  FAT  FAT  FAT  FAT  FAT  FAT  FAT

 8 MB File
 Write MB/se   126   75   10   16   18   18   21   16    2    3    4
 Read MB/sec   122   92   31   33   29   26   26   34   14   15   16

 16 MB File
 Write MB/se   126   95   11   12   16   21   22   13    4    4    4
 Read MB/sec   122   92   31   31   29   26   26   32   14   15   16

 32 MB File
 Write MB/se   121   92   10   12   20   20   18   12    3    4    4
 Read MB/sec   122   97   31   31   29   26   26   32   14   15   16

 8 MB Cached File
 Write MB/se   942 1222  948  568   18   18   21  612    2    4  566
 Read MB/sec  3331 2468 3449 3518 1359  936 1058 3561 1049 1137 3305

 Bus Speed
 Read MB/sec   125  261   28   31   29   25   25   32   14   15   16


 Drive         HD1  HD2  Pat  Pat  Pat  Pat  Pat  Pat  Sig  Sig  Sig
 Size Bytes    11G 230G   6G   8G   8G   8G 336M 336M   1G   8G   8G
 OS           Ubun Win7 Ubun Ubun WinV Win7 Win7 Ubun Win7 WinV Ubun
 Fornat       Ext4 NTFS Ext4  FAT  FAT  FAT  FAT  FAT  FAT  FAT  FAT

 Random Read msecs
 File MB
           2   0.4  0.1  0.5  0.5  0.6  0.8  0.8  0.5  1.9  1.6  6.8
           4   0.4  0.1  0.9  0.5  0.6  0.8  0.8  0.5  1.9  1.6  1.0
           8   0.4  0.1  0.5  0.5  0.6  0.8  0.8  0.5  1.9  1.6  1.0
          16   2.8  0.2  0.5  0.5  0.6  0.8  0.8  0.5  1.9  1.6  1.0
          32   5.2  3.1  0.5  0.5  0.5  0.8  0.8  0.5  1.9  1.6  1.0
          64   6.1  5.8  0.5  0.5  0.6  0.8  0.8  0.5  1.9  1.6  1.0
         128   6.9  6.9  0.5  0.5  0.5  0.8  0.8  0.5  1.9  1.6  1.0


 Random Write msecs
 File MB
           2   1.4  0.5    9    3    4    4    3    5   42   68   36
           4   1.5  0.9   10    8    4    4    6    6   40   40   53
           8   2.0  0.9    3    6    4    5    3    3  166  139  125
          16   2.7  1.3   14    3    3    3    4   45  235  275  262
          32   3.1  1.3   51    5   64   49   52   89  290  289  330
          64   4.5  1.7   51    9  106   86  106   91  303  302  341
         128   3.2  2.2  122  100   25   21   76   95  316  348  331

 Write 500 Files - ms/file
 File KB
           2   1.0  2.5  9.2  9.1 32.7 36.9 40.6  8.8 72.1  283 22.8
           4   0.6  0.7  7.1  6.6 29.7 36.5 38.2  9.7 52.9  259 14.2
           8   0.3  0.7  9.7  6.8 29.9 39.8 40.0  8.5 35.5  310  2.6
          16   0.5  0.8 10.6  7.6 31.1 37.4 38.3  8.1 36.5  291  5.4
          32   0.7  1.1  9.1  7.0 30.3 37.3 39.4  7.3 42.3  325  9.4
          64   1.2  1.2  7.6  4.3 32.9 40.0 40.2  5.3 52.9  338 17.1

 Read 500 Files - ms/file
 File KB
           2   0.2  2.5  0.6  0.7  2.8  5.5  4.2  0.7  6.8  4.0  1.8
           4   0.2  0.7  0.7  0.7  2.9  6.4  4.4  0.7  6.1  4.7  1.9
           8   0.2  1.1  0.9  0.8  3.0  6.1  4.4  0.8  7.6  5.1  2.1
          16   0.3  1.0  1.2  1.0  3.7  7.7  4.7  1.3  8.1  5.3  2.6
          32   0.5  1.2  1.8  1.6  3.6  6.8  5.1  1.8  6.2  5.0  2.8
          64   0.8  1.4  2.7  2.4  4.6  7.2  6.0  2.7  9.3  7.2  4.6

 Delete 500 Files seconds
              0.01 0.10 0.01 0.01  9.5 11.7 11.3 0.01 10.4 80.9 0.01

To Start


Example LanSpeed Results Log

Following is an example log file of the 64-Bit version running on a 3 GHz AMD CPU.

###############################################################

  Assembler CPUID and RDTSC       
  CPU AuthenticAMD, Features Code 178BFBFF, Model Code 00100F42 
  AMD Phenom(tm) II X4 945 Processor 
  Measured - Minimum 3014 MHz, Maximum 3014 MHz 
  Linux Functions 
  get_nprocs() - CPUs 4, Configured CPUs 4 
  get_phys_pages() and size - RAM Size  7.81 GB, Page Size 4096 Bytes 
  uname() - Linux, roy-64Bit, 2.6.35-24-generic 
  #42-Ubuntu SMP Thu Dec 2 02:41:37 UTC 2010, x86_64 

 ###############################################################

 Selected File Path: 
 /media/public/
 Total MB  181552, Free MB  116182, Used MB   65370

 Linux LAN/WiFi Speed Test 64-Bit Version 1.1, Thu Feb 24 17:53:08 2011

                Copyright (C) Roy Longbottom 2011

     8 MB File         1          2          3          4          5
 Writing MB/sec      51.00      52.49      54.27      51.11      51.00
 Reading MB/sec      38.20      39.61      38.61      20.13      37.29

    16 MB File         1          2          3          4          5
 Writing MB/sec      49.93      49.74      49.93      51.63      51.59
 Reading MB/sec      38.13      38.24      37.86      37.73      36.67

    32 MB File         1          2          3          4          5
 Writing MB/sec      50.32      49.86      51.14      50.13      50.51
 Reading MB/sec      38.05      37.65      37.13      35.66      34.52

 ---------------------------------------------------------------------
 8 MB Cached File      1          2          3          4          5
 Writing MB/sec      48.35      54.17      49.09      49.06      48.69
 Reading MB/sec      36.70      37.12      38.94      36.80      36.50

 ---------------------------------------------------------------------
 Bus Speed Block KB     64        128        256        512       1024
 Reading MB/sec    9067.93    9376.58    9015.02    4643.32    4603.90

 ---------------------------------------------------------------------
 1 KB Reads File MB >    2      4      8     16     32     64    128
 Random Read msecs    0.46   0.45   0.45   0.46   0.57   0.46   0.46

 ---------------------------------------------------------------------
 500 Files   Write             Read             Delete
 File KB     MB/sec  ms/File   MB/sec  ms/File  Seconds
       2       0.95     2.15     1.27     1.61    0.212
       4       1.88     2.18     4.00     1.02    0.193
       8       3.47     2.36     8.70     0.94    0.209
      16       6.68     2.45    16.98     0.96    0.204
      32      11.70     2.80    25.13     1.30    0.221
      64      18.97     3.46    31.11     2.11    0.286

              End of test Thu Feb 24 17:54:18 2011

To Start


LAN and WiFi Results

Below are are range of results for 100M and 1G bits per second wired LAN connections with others involving 54M bits per second wireless transmissions. Results include those using the lanspeed 64 bit and 32 bit Linux varieties with others via the Windows (drivespeed.exe) version.

Large Files - Wireless to wireless speeds via the router are disappointingly slow. With wireless to LAN connections, speed from the new cheap netbook is 25% faster than the 2008 expensive laptop. The results via 100M bits per second LAN are the most efficient and consistent. Data transfer speed using Linux over 1G bits per second LANs can be half of what might be expected, whereas the Windows benchmark can achieve expectations. These results might be influenced by the latter using direct I/O and the former allowing the file cache to be used. However, for the cached test, there is no difference in the mode of operation.

Bus Speed Test - As indicated earlier, this test repetitively reads the same block of data to measure bus speeds from a disk’s buffer. At least with these tests using Windows, LAN speed is measured, but Linux appears to be rereading data from a local buffer, reflecting RAM speed.

Random Reading Time - On reading 1 KB out of different file sizes, the time is constant for a particular environment, often being faster than reading from a disk drive. It appears to be safe to assume that the data is being read from the remote PCs memory. Then, reading time depends on network speed. The 64 bit Linux benchmark appears to be faster than the 32 bit version and, with Windows, Win7 might be faster than Vista.

Small Files - Reading and writing times of 500 different sized files, of up to 32 MB total space, are again buffered in remote RAM and can be mainly dependent on a constant overhead that decreases with increasing network speed. There are variations that might depend on differing packet sizes and, in this case, the Widows versions produce slower speeds than the Linux tests.


 Version       32b  32b  32b  32b  32b  64b  32b  64b  64b  64b  Win  Win
 CPU used      Net  Lap  Lap  Net  Net  C2D  Net  Net  C2D Phen  C2D Phen
 Remote        Lap Phen  C2D Phen  C2D  Net  C2D  C2D Phen  C2D Phen  C2D
 From         Wifi Wifi Wifi Wifi Wifi L100 L100 L100 L1Gb L1Gb L1Gb L1Gb
 To           Wifi  LAN  LAN  LAN  LAN L100 L100 L100 L1Gb L1Gb L1Gb L1Gb
 
 8 MB File
 Write MB/s    1.6  2.7  2.7  3.4  3.4  9.7 10.2 10.2   53   54   76  102
 Read MB/s     1.3  2.6  2.6  2.8  2.8  8.4  8.3  8.3   44   40   52   58

 16 MB File
 Write MB/s         2.7  2.7  3.4  3.4  9.7 10.2 10.2   64   52   76  107
 Read MB/s          2.6  2.6  2.8  2.8  8.3  8.3  8.2   44   38   51   64

 32 MB File
 Write MB/s                   3.4  3.3  9.7 10.2 10.2   56   51   89  111
 Read MB/s                    2.8  2.8  8.3  8.3  8.3   44   38   51   56

 8 MB Cached File
 Write MB/s    1.6  2.7  2.7  3.4  3.4  9.5 10.2 10.2   54   54   56  102
 Read MB/s     1.3  2.6  2.6  2.8  2.8  8.4  8.3  8.2   44   39   65   94

 Bus Speed
 Read MB/s    1622 3599 3549 1594 1591 4928 1739 1501 6818 9377   53   57
 
 Version       32b  32b  32b  32b  32b  64b  32b  64b  64b  64b  Win  Win
 From         Wifi Wifi Wifi Wifi Wifi L100 L100 L100 L1Gb L1Gb L1Gb L1Gb
 To           Wifi  LAN  LAN  LAN  LAN L100 L100 L100 L1Gb L1Gb L1Gb L1Gb
 
 Random msecs
     File MB
           2   8.4  4.3  4.1  4.2  4.1  1.0  1.5  1.0  0.4  0.5  0.3  0.7
           4   8.4  4.2  4.0  4.0  3.9  0.9  1.5  0.9  0.4  0.5  0.3  0.6
           8   8.5  4.5  4.3  4.2  4.1  0.9  1.4  0.9  0.4  0.5  0.2  0.6
          16  10.6  4.2  4.1  4.0  3.9  0.9  1.4  0.9  0.4  0.5  0.2  0.5
          32   8.4  4.4  4,2  4.1  4.1  0.9  1.5  0.9  0.4  0.6  0.3  0.6
          64        4.3  4.2  4.1  4.0  0.9  1.4  0.9  0.4  0.5  0.3  0.5
         128                  4.0  4.0  0.9  1.5  0.9  0.4  0.5  0.3  0.6

 Write 500 Files - ms/file
     File KB
           2  14.4  7.3  6.5  6.1  5.9  4.0  2.7  2.8  2.9  2.2  8.9  3.7
           4  15.3  7.3  6.7  6.6  6.5  4.0  2.9  3.2  2.5  2.2  6.2  3.3
           8  20.7  9.4  8.1  7.7  7.6  4.5  3.3  3.6  2.6  2.4  6.0  3.7
          16       12.4 11.5  9.9 12.8  5.4  4.0  4.4  2.7  2.5  6.2  3.5
          32                 14.7 14.4  6.9  5.3  5.7  2.9  2.8  6.0  4.6
          64                 25.8 24.8 10.5  8.9  9.4  3.7  3.5  6.8  4.7

 Read 500 Files - ms/file
     File KB
           2   8.6  5.7  5.9  4.9  4.6  2.8  2.0  2.2  1.0  1.6  3.2  2.6
           4  10.4  5.6  5.4  5.3  5.3  3.0  2.1  2.5  0.8  1.0  3.2  2.7
           8  13.0  7.0  7.3  6.4  6.3  3.3  2.6  2.8  0.8  0.9  3.2  2.7
          16        9.7  9.4  8.9  8.9  4.0  3.4  3.7  0.8  1.0  3.3  2.7
          32                 15.1 14.9  5.9  5.4  5.6  0.9  1.3  3.5  3.6
          64                 28.1 27.3  9.8  9.3  9.5  1.2  2.1  4.5  4.0

 
 Systems Used                                   Network
 
 Net  - Netbook, 1.6 GHz Atom                   WiFi - Wireless   
 Lap  - Laptop,  1.8 GHz Core 2 Duo             L100 - 100 Mbps LAN
 C2D  - Desktop, 2.4 GHz Core 2 Duo, Vista      L1Gb -   1 Gbps LAN
 Phen - Desktop, 3.0 GHz QuaD Phenomm Win7

To Start


Roy Longbottom March 2012



The Main Internet Home for my PC Benchmarks is via the link
Roy Longbottom's PC Benchmark Collection