issue156:mon_histoire
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue156:mon_histoire [2020/04/25 14:24] – créée auntiee | issue156:mon_histoire [2020/05/06 10:54] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | I went and bought a bunch of USB thumb drives / memory sticks from a supplier on sale a while ago (actually a few years). Copying to and from these – I noticed some had horrible speeds. Now since they are all the same brand, I wondered if there was a way to test them. I used Parted to format them in different file systems and configurations, | + | **I went and bought a bunch of USB thumb drives / memory sticks from a supplier on sale a while ago (actually a few years). Copying to and from these – I noticed some had horrible speeds. Now since they are all the same brand, I wondered if there was a way to test them. I used Parted to format them in different file systems and configurations, |
The solution | The solution | ||
Ligne 5: | Ligne 5: | ||
The first thing that came to mind was dd. When dd is done, you get an output that lists the average speed. So, writing the Ubuntu image to the different drives (8, 16, 32) GB drives yielded different results. Then writing them to the same size drives (I bought two of each) again yielded different results. To get some sort of metric, I opened another terminal and ran iotop, This is not shipped with Ubuntu and you can install it with: sudo apt install iotop - The nice thing with this is you get read and write metrics. So not all USB thumb drives are created equally. The very first result in my search engine yielded: | The first thing that came to mind was dd. When dd is done, you get an output that lists the average speed. So, writing the Ubuntu image to the different drives (8, 16, 32) GB drives yielded different results. Then writing them to the same size drives (I bought two of each) again yielded different results. To get some sort of metric, I opened another terminal and ran iotop, This is not shipped with Ubuntu and you can install it with: sudo apt install iotop - The nice thing with this is you get read and write metrics. So not all USB thumb drives are created equally. The very first result in my search engine yielded: | ||
https:// | https:// | ||
- | (which was not quite what I was after, yet...). | + | (which was not quite what I was after, yet...).** |
- | A light went on and I considered hdparm, which I have not used in about ten years or more. I was introduced to hdparm by my friend Lloyd in the wild west days of Ubuntu 04.04, to speed up my laptop. I did not consider it as I did not know if it would work for USB thumb drives and SSDs. You do not need to install hdparm – like dd, it ships with Ubuntu. Just typing hdparm will bring up a list of options. If you go down the list to ‘t’ - you will see lowercase and capital ‘t’ – both perform read timings. So I had to try: sudo hdparm -Tt /dev/sdX - (where X is your USB thumb drive). Frown... >:o( .... The results here were much faster than dd. Okay, let’s turn write caching off and back on again (the W flag), and re-test. Although there is a performance impact, it still does not match my measurements from dd. | + | Je suis allé acheter un tas de clés USB/cartes mémoires auprès d'un fournisseur qui les soldait il y a quelque temps (en fait quelques années). En copiant vers et depuis celles-ci, j'ai remarqué que certaines avaient des vitesses horribles. Bon, puisqu' |
- | This was a mystery that needed solving. One of the 8GB memory sticks was quite a bit slower than the rest. Let us see what is happening. Running dmesg you should see the memory stick added at the end. Now run lsusb -v | grep bcdUSB to see what it was detected as: | + | La solution |
- | Aaaand there it is. One of the USB 3.0 memory sticks only detects as USB 2.0. If you are not sure which is which, run lsusb -t, then you can see which bus and port it is on. | + | La première chose qui me vint à l' |
+ | https:// | ||
+ | |||
+ | **A light went on and I considered hdparm, which I have not used in about ten years or more. I was introduced to hdparm by my friend Lloyd in the wild west days of Ubuntu 04.04, to speed up my laptop. I did not consider it as I did not know if it would work for USB thumb drives and SSDs. You do not need to install hdparm – like dd, it ships with Ubuntu. Just typing hdparm will bring up a list of options. If you go down the list to ‘t’ - you will see lowercase and capital ‘t’ – both perform read timings. So I had to try: sudo hdparm -Tt /dev/sdX - (where X is your USB thumb drive). Frown... >:o( .... The results here were much faster than dd. Okay, let’s turn write caching off and back on again (the W flag), and re-test. Although there is a performance impact, it still does not match my measurements from dd. | ||
+ | |||
+ | This was a mystery that needed solving. One of the 8GB memory sticks was quite a bit slower than the rest. Let us see what is happening. Running dmesg you should see the memory stick added at the end. Now run lsusb -v | grep bcdUSB to see what it was detected as:** | ||
+ | |||
+ | Une lumière s'est allumée et j'ai envisagé hdparm, que je n' | ||
+ | |||
+ | C' | ||
+ | |||
+ | **Aaaand there it is. One of the USB 3.0 memory sticks only detects as USB 2.0. If you are not sure which is which, run lsusb -t, then you can see which bus and port it is on. | ||
Before any of you say: “hey, why didn’t you just use gnome disks benchmarking? | Before any of you say: “hey, why didn’t you just use gnome disks benchmarking? | ||
- | Make sure your data is backed up before running the benchmark! | + | Make sure your data is backed up before running the benchmark!** |
- | The Conclusion | + | Et la voilà. L'une des clés USB 3.0 n'est détectée qu'en USB 2.0. Si vous n' |
+ | |||
+ | Avant que l'un d' | ||
+ | |||
+ | Assurez-vous que vos données sont sauvegardées avant d' | ||
+ | |||
+ | **The Conclusion | ||
I got different results on different drives of the same size, as well as different results between the same make but different sizes. Some drives, even though being labelled as USB 3.0, were detected as USB 2.0, so check your drives after buying them! (I could not return mine as they have been lying in a box for over a year). | I got different results on different drives of the same size, as well as different results between the same make but different sizes. Some drives, even though being labelled as USB 3.0, were detected as USB 2.0, so check your drives after buying them! (I could not return mine as they have been lying in a box for over a year). | ||
- | Benchmarking is faster than real-world usage, as seen with dd, so rather work with that if you want to know the ‘true’ speed of your USB thumb drive. So - if the ‘true’ speed of your device does not match your expectation, | + | Benchmarking is faster than real-world usage, as seen with dd, so rather work with that if you want to know the ‘true’ speed of your USB thumb drive. So - if the ‘true’ speed of your device does not match your expectation, |
+ | |||
+ | Conclusion | ||
+ | |||
+ | J'ai obtenu des résultats différents sur différents disques de la même taille, ainsi que des résultats différents entre des disques de même marque, mais de tailles différentes. Certaines clés, même si elles sont étiquetées comme USB 3.0, ont été détectées comme USB 2.0, alors vérifiez vos disques après les avoir achetés ! (je n'ai pas pu rendre le mien car ils dorment dans une boîte depuis plus d'un an). | ||
+ | |||
+ | L' | ||
issue156/mon_histoire.1587817450.txt.gz · Dernière modification : 2020/04/25 14:24 de auntiee