From Mageia wiki
Jump to: navigation, search


Drakconf multiflag.png
Other languages
English ; Nederlands ;
Synopsis:
Speed test results, mainly of removable storage devices, such as USB sticks. Main purpose is to see what devices are usable for Mageia Live persistent systems, or Live or classic install to removable device.

Mission

USB memory stick is most common, but Mageia can also boot and run on other portable storage such as CompactFlash or SD card.

This page collect some tests performed on various storage devices, mainly USB sticks, SD-cards, and CompactFlash with emphasis on USB storages suitable for Mageia Live with persistence enabled, or for a more conventional install to removable device.

This usage is different from what is normal use if such devices, and they may differ vastly in performance despite being marketed to similar speeds. The reason is that an operating system frequently reads and writes many small chunks, which is very different from storing pictures, videos or other large files. One specifically demanding task is when the system is handling packages, so that is one of the tests we perform. This value can vary more than ten times between devices that are marketed to the same sustained write speed!

It is hard to find speed numbers for writing many small files. One source is https://usb.userbenchmark.com/ sort by column "Peak 4k W". In the test "A" below for package removal the difference was even greater than the difference in that number, probably because writes was much smaller in test "A".

Discrepancies

There are so many parameters involved for what results a test give, and how Mageia performs, and the workload is apparently a bit different.

  • KDiskMark speed result do not easily translate to tests on running Mageia. In the table below you see USB-stick Sandisk Ultra according to KDiskMark performs best using Btrfs, but a test in Mageia running on it, Btrfs is much slower than our default Ext4.
  • KDiskMark speed result is mostly rather insensitive to filesystem type, despite operating in a filesystem folder.
  • Of the media I have tested most was already used, but even the new ones did not get notably affected in write performance after being fed their capacity of data, forcing erase. Probably all(?) have lots of spare space??
  • Two of the USB stick was not accepted as bootable media on one of my Laptops!
  • High end USB sticks beats a mainstream(?) external SSD in speed by good margin!

This author is no expert on this. Another testing tool and knowledge to handle it would do good.

But, we can also say it is easy: Just try it out easily by using Isodumper to create a Mageia Live with persistence, boot it, and perform Test A or B as described below. You can also compare boot time - of course that will be much more dependent on your computer than the tests in this page.

You are much welcome to add improved testing methods. - Preferably with some explanations and theories!  ;)

File systems

Unless otherwise noted tests are performed using the ext4 file system, with no tweaks, because that is the default file system both for a standard installation of Mageia, and for Mageia Live persistence. That file system also have a lot of recovery tools, in case of problems. The other two we concentrate on is FAT32 as it may be used for sharing files to other operating systems, and F2FS as it is optimised for flash (speed, wear resilience). Mageia 8 supports booting on F2FS, as well as using it for Live persistence.

There are optimisation options for all choices, especially F2FS, but they are out of scope of this wiki page.

For more information see Testing storage speed.

Reliability

We have not tested wear resistance nor resilience of any kind. For good performance in such areas, the device have to have a good embedded controller to perform good wear levelling, error correction, and other tricks, as well as being of overall good quality. If you need that you should choose a real SSD, a USB device that is marketed to have such features embedded, or an Industrial type CompactFlash - they are traditionally used like SSD drives in industrial control systems.

Another lesson learned is that devices that protrude far out from the computer pose a risk of being mechanically damaged... Also depending on where you want to carry it and if content is valuable, water resistance may be important.

Test results

Column explanations

  • Special tests Run time in seconds. If not specified ext4 is used. Note: see column "Who", and read below the table about how that person performed the test, i.e what equipment.
    • Test "A": Real life Mageia Live packages handling: Time for removing all unused localisation on a fresh Mageia Live 7.1 i586 Xfce Live with persistence of default typ ext4. This executes many small writes. Note the difference in result is exaggerated in comparison to normal use. (Normal package management installing and updating will show less difference due to larger data chunks and download time add to total time.) This test is easily repeatable: Procedure: Boot to desktop, in terminal enter su - and remove-unused-packages, in the dialogue deselect "Remove unused hardware support", OK. Time measured between system log entries for first and last package removal.
    • Test "B": Like Test A but updated: using Mageia Live 8 Xfce i586 Live. Note 1: More time included: whole time from "Transaction ID xxxxx started" Until "Transaction ID xxxxx completed", which is depending on device about 3 to 20 seconds more than counting like in Test A. Note 2: In Mageia 8 more packages get removed. Note 3: Mageia 8 Live support F2FS persistence, so can be tested.
      Procedure: Boot Mageia 8 Live Xfce with persistence, open terminal and enter su -, remove-unused-packages, deselect "Remove unused hardware support", OK, let it complete and then see time it took by issuing journalctl -b and calculate time between lines containing "started" and "completed".
    • Test C, the best of A, B, C, but most work to do: clock a defined install of many packages. After test B, configure network and repos, update the system, prefetch all needed packages, and then run the actual test. In more words: Perform Test B, configure network, configure media, urpmi --auto-up --test, urpmi --auto-up, urpmi task-plasma --auto --test. Finally the actual test: urpmi task-plasma --auto. See the time like in test B, but note that this time there are many transactions: take difference from the first "started" to the last "completed" - but do not include the test B or update transactions before... Execute it on a machine with at least 2GB RAM, and use same machine for all comparable tests. Preferably test both ext4 and F2FS persistence, maybe Btrfs, also note down any tweaks from defaults.
  • KDiskMark MB/s The KDiskMark tests were performed using Profile "Real World Performance". Data set was normally 256MB, but 512GB for fastest device, and 16GB for the slowest ones. More info regarding testing see Testing storage speed.
    Seqential Read affect boot time, and load time of big program and user files; Write when you quickly want to write much large files quickly. (This raw write speed is not of much weight for using as system drive or Live persistence, but for large documents.)
    Random position 4k size blocks Read and Write - Usually the most important property for a storage when used as system drive or Live persistence, is the ability to handle a lot of small read and write operations quickly.
  • Device Type - USB = "USB stick", CF = CompactFlash, SD = SD card. CF and SD connected via USB adapter.
    Product Name Device name, markings, name it reports, size...
  • Comment - Comments
  • Who - Test operator and description: see list below table
Special
tests
(seconds)
KDiskMark MB/s
Seq R/W - Rnd4k R/W - fs
Device type, Product name Comment Who
A:60 B:49 C:206 USB3:
252/175 - 19/30 - ext2
320/174 - 19/30 - ext3
316/177 - 20/29 - ext4
319/175 - 19/30 - XFS
286/174 - 18/25 - Btrfs
314/175 - 19/29 - F2FS
252/117 - 18/18 - NILFS2
315/169 - 19/30 - FAT32
USB2:
39/37 - 11/14 - ext4
USB3, Corsair Voyager GTX 128GB FAAAST, but expensive, physically big, heavy, power consuming: idle 110mA, during USB2 speed test: write 170mA, read 158 mA.

KDiskMark tests using 512MB data. Interesting: at 4k, write is faster than read - nice buffering! Sequential write speed verified by dd bs=1M count=1000 if=/dev/random of=/dev/sdh5 conv=fdatasync. I noted when dumping a large ISO file to it, that the first two gigabyte transferred at triple speed compared to the rest, so it seem to keep a large pool of erased blocks ready.

We see that for this workload on this advanced device file system type do not matter much for speed, but remember filesystem type matters much for reliability and resilience!.

We also see that for frequent small reads and writes, USB2 is more half as fast as USB3 on this high end device - the difference USB2/3 is much smaller on slower devices.

M1
A:84 B:80 C:985
F2FS:
Btrfs B:83
263/38..120 - 10/3,4..4,6 - ext4, FAT32, F2FS *) USB3, SanDisk Extreme 32GB FAAST, reasonable cost and energy efficient , but physically rather fragile when in use as it protrudes far out. *) As for other drives the speed is about same for different filesystems using KDiskMark. The sequential *write* speed result is strange: I can simply restart same test and get 57MB/s, then 113MB/s, then 81MB/s... I was thinking it is doing erase when idle, but it is not always fastest after idling... Then I used dd to write 1GB random data directly to a partition on the stick: dd if=rand1G of=/dev/sdh1 bs=16M conv=fdatasync, manually issuing that repeatedly as quick as I can and it always give 91 to 113 MB/s. M1
A:87s B:91 C:498
F2FS:
Btrfs B:83s
78/34 - 13/18 - ext4, F2FS, FAT32 *) USB3, Samsung FIT Plus MUF-64AB 64GB FAAST, reasonable cost, energy efficient, next smallest physically. Good price. Good choice. KDiskMark using 512MB data. *)Interesting: 1) All speed is identical for ext4, F2FS, FAT32, with the exception sequential *read* is sometimes 90 for F2FS, and for ext4 sometimes 70 - But most often around 78 for any fs. Using i.e dd bs=1G count=2 if=/dev/sdc1 of=/dev/null iflag=direct I repeatedly get 77..79 MB/s. 2) according to KdiskMark it was expected to perform better than Sandisk Extreme in Test A but it did not. M1
A:105 ext4
A:355 Btrfs
B&C TBD
121/13 - 6,2/1,6 - ext4
120/14 - 5,9/1,7 - XFS
121/14 - 6,2/2,8 - Btrfs
123/14 - 6,0/1,7 - F2FS
120/14 - 6,1/1,8 - FAT32
USB3, Sandisk Ultra USB 3.0 16GB OK. Cheap. KDiskMark 64MB data. Interesting: The high Btrfs random write speed. Verified by second run, and also swapped formatting between the Btrfs and F2FS partitions (partitions for all tests was initially made at once) unchanged result for both: According to KDiskmark, Btrfs is the speed champion on this device with default settings, but for Mageia 7.1 Live it is extremely inefficient compared to ext4. M1
A:121 139/16 - 7,2/1,8 - ext4
139/25 - 7,5/1,6 - F2FS
138/28 - 7,2/1,5 - FAT32
USB3, SanDisk Ultra Fit 16GB OK. Smallest physically = less risk to damage it or the port as it only marginally extends from computer. M1
A:230 226/97 - 19/1,6 - ext4 USB3, Kingston DT Elite G2 "DTEG2" 32 GB SLOW This modern high-end device is VERY fast at large files write and read. A few writes in a row is fast, then it pause. BIOS incompatibility: This device was not selectable for boot on Thinkpad T43, so a T400 was used instead, which is a bit faster. M1
A:68 minutes 33/17 - 3,9/0,86 - ext4
33/17 - 4,2/0,83 - F2FS
USB2, Transcend Ultra Speed 8GB ("JetFlash" in log) UNUSABLE for our case. Rather OK on large files. M1
A:80 minutes 33/11 - 7,4/0,06 - ext4
33/11 - 7,4/0,05 - F2FS
USB2, Corsair Voyager GT 16GB UNUSABLE for our case. Rather OK on large files. M1
B:187 minutes 135/16 - 11,7/1,4 ext4 USB3 + microUSB OTG; Double ended, Kingston DTDUO3/32GB UNUSABLE for our case. Rather OK on large files. BIOS incompatibility: This device was not selectable for boot on Thinkpad T43, so a T400 was used instead. M1
A:76 19/17 - 5,1/3,1 - ext4
19/18 - 5,1/2,8 - XFS
19/17 - 5,0/3,0 - Btrfs
19/17 - 5,1/3,1 - F2FS
19/17 - 5,2/3,1 - FAT32
MicroSD (in USB2 adapter), Sandisk Extreme V30 MicroSD XC1 U3 A1 64GB FAAST - an impressive little thing! KDiskMark 64MB data. Test run both when it was almost new, and after having written it full plus more in order to force it to erase. No change in speed result! M1
A:79 19/12 - 3,5/4,2 - ext4
19/12 - 3,6/4,2 - F2FS
SD (in USB2 adapter), Kingston SDS SD HC I U "(10)" 16GB FAAST M1
A:163 SD (in USB2 adapter), SanDisk Ultra 30MB/s HC I "(6)" 4GB Mediocre M1
A:268 MicroSD (in USB2 adapter), Samsung MicroSD HC "(10)" 32GB Slow M1
No way! 19/2,8 - 2,5/0,0 *) - ext4 MicroSD (in USB2 adapter), Verbatim MicroSD HC "(4)" 8GB UNUSABLE *) I gave up after 10 minutes M1
A:109 B:136 *) 18/15 - 4,2/1,1 - ext4
20/19 - 4,6/1,1 - F2FS
CF (in USB2 adapter), Transcend UDMA 400X 16GB Fast *) Test B performed with the CF installed in laptop using IDE adapter. B is supposed to take longer time than A so apparently USB2 or IDE do not matter regarding speed here. M1
A:137 19/14 - 4,5/1,2 - FAT32 CF (in USB2 adapter), Transcend Industrial CF170 16GB OK and Industrial class
- 19/16 - 5,3/0,18 - FAT32 CF (in USB2 adapter), Transcend ULTRA 4GB Industrial SLOOOW "ULTRA" apparently means ultra slow ;) at small writes M1
A:158 17/18 - 3,3/0,84 - ext4 CF (in USB2 adapter), SanDisk Ultra II 15MB/s 8GB Slow M1
A:442 19/8,6 - 4,9/0,12 - ext4
19/8,8 - 5,3/0,12 - F2FS
19/8,4 - 5,3/0,12 - FAT32
CF (in USB2 adapter) - Industrial CompactFlash Swissbit 8GB SFCF8192H4BK4SA-I-QT-533-SMA SLOOOW High reliability product for use as industrial controller system drive etc. Web search on that product ID and you will find a massive data sheet! For some not investigated reason Mageia Live drop to debug shell during boot if IDE connection is used but in USB adapter it works. M1
128/125 - 0,80/3,4 - ext4
138/123 - 0,79/1,43 - FAT32
SSD external on USB3
Seagate M3 portable 1TB
External SSD, for reference. Surprisingly slow! And weird that random write is slower on FAT32 than the journalling ext4. M1
242/216 - 29/67 - ext4 SSD internal on SATA 6Gbit/s
Samsung SSD 860, 512GB
Testing computer internal, for reference. KDiskMark 512MB data. M1

To be completed... You are much welcome to add tests in the table and describe your set-up below, and any new test type under "Column explanations" above.

Operator nickname, and general setup unless otherwise stated in comments

  • M1 Wiki id: Morgano. Test A performed on Thinkpad T43 1,86GHz i586, 2GB RAM, USB2 ports. For keeping only my locale (sv), on Mageia 7.1 it removed 501 packages, Mga8:541. Reference test without persistence, so the work was performed in RAM: 28 seconds. Test B performed on Thinkpad T400 2,26GHz, 64 bit, 2GB RAM, USB2 ports. KDiskMark tests performed on workstation with Intel i7, Mageia 7, USB3 where USB stick is USB3, KDiskMark 2.0.0 from link at mga#27682, Fio-3.13. CF and SD via USB2 adapter, one CF test on IDE (Because I have no USB3 adapter, and in most cases it will not make much difference, see test on fast USB3 stick.). All partitions and filesystems was created using Gparted on Mageia 7, default alignment to 1MB. Alignment to erase block should not matter on modern USB devices, might matter on low end devices. Probably some file systems may perform better when tweaked, especially F2FS on Mageia 8, as I read F2FS have had much work in new kernels, including new compression. Compression speed gain depends on data type. Test results are omitted for NTFS: insane high and way from other tests on internet. Buffering driver?
  • ... ...

Test comments

  • It would be nice to have Test B & C performed on Mageia 8 with both Ext4 and F2FS and maybe Btrfs persistence on interesting devices.
  • Interesting devices to test if anyone have: More fast devices, especially if not too expensive. "SanDisk Extreme Pro" is interesting - because "Sandisk Extreme" is tested next best but much less expensive than the best
  • The storages should first all have been written full, plus some more to use internal extra blocks, before the test. Some of tested devices are much used, but some almost new. Storages may be much slower at writing after a while when they are forced to erase before writing - which they need not do when fresh. This behaviour is supposed to differ much between different devices, and also depend on file system used. Both for the devices I could try (not already much used), I found no difference!