Comparing speed Manjaro on USB vs SSD

Hello,

Recently i have installed the latest Manjaro xfce on a USB flash drive (btrfs).
After a few days of working on that USB drive i am surprised
with the speed it performs, i can hardly notice the difference with my installation on the SSD drive.
So i found a terminal command that writes 1GB in a testfile on the /home partition, performs a write- and read speed test, shows the results and then removes the test file.

Here are the results of that speedtest.

speed-test USB
WRITING: 66,1 MB/s
READING: 158 MB/s

speed-test SSD
WRITING: 305 MB/s
READING: 356 MB/s

As you can see there is a big difference but my question is how is it possible that i don’t notice much difference in booting up and doing some basic stuff like browsing, 3d drawing etc.?
Does the kernel have something to do with this?
6.18.49-1 on SSD, vs the new kernel 7.1.13-2 on USB.

Thanks for a reply
Jean

Caching and preloading. :wink:

Yes, but not only the kernel. glibc for instance is almost always fully loaded into virtual memory, as are other shared libraries.

Thanks.

Please read up on file system cache.

Linux kernel caches writes and subsequently flushes the cache to the device in question.

The write speed will always be reflected by the capabiltity and quality of your USB storage device.

Do not ever trust the data to be actually written to the USB disk unless you issue the sync command or you have the package udev-usb-sync sync’ed to your system.

Even with caching, the boot times and specific things should be affected. But sometimes it can be hard to notice, given the way things have evolved with storage and architectures.

These types of numbers used to mean more. But this particular test is only measuring sequential read/write throughput, and that’s a relatively small part of the picture for desktop usage.

NVMe storage is much more complex than simply looking at those numebrs. It can handle many I/O requests in parallel, and the performance characteristics that matter for things like booting and launching applications can be very different.

Once you’re into reasonably fast consumer storage, the CPU can become the bottleneck for some of those operations, and some things will ultimately come down to a single (or multi) core bottleneck, or simply just waiting on I/O.

Besides, if you for example load a web page that is 1 MB big, you won’t notice if it is written to the cache in 1/66th or 1/300 of a second - your internet connection will still be many times slower.

There are scenarios in which you will notice the usb, it is just not the browsing.
What would worry me more it the reliability/wear leveling. Usb sticks are just not designed for such usage because of cost reasons. It will fail a lot sooner as a proper disk (still, a couple of years probably, but not for example 15 or 20 years).

This. :backhand_index_pointing_up:

Which Terminal command is that?

dd if=/dev/urandom of=/dev/shm/bron bs=1M count=1024 status=none && echo -n "WRITING: " && dd if=/dev/shm/bron of=$HOME/testfile bs=1M conv=fdatasync 2>&1 | awk -F’, ’ ‘/copied|gekopieerd/ {print $NF}’ && echo -n "READING: " && dd if=$HOME/testfile of=/dev/null bs=1M iflag=direct 2>&1 | awk -F’, ’ ‘/copied|gekopieerd/ {print $NF}’ && rm $HOME/testfile /dev/shm/bron

Considering the Dutch words in that command, you obviously got that from an A.I. :stuck_out_tongue:

Yes,
But i could also have asked it in English.
If this command is dangerous…let me know.

It doesn’t look dangerous to me. :wink: