Welcome!
Forum users

Current releases
--MX-23 release info here
--Migration information to MX-23 here
--antiX-23.1 (Arditi del Popolo) release info here

Important information
--If in starting your system it boots to an unwanted Desktop, right click desktop, then select leave and logout. At the
login screen there is a session chooser at the top of the screen.

News
-- MX Linux on social media: here
-- New Forum Features, Marking Solved and Referencing a User: here

Yet another new inxi feature: disk speeds!

Message
Author
User avatar
h2-1
Posts: 208
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#21 Post by h2-1 »

Adrian, I looked up your mobo, seems to be sata 3, so I can't account for why the disk is reporting its speed as sata 2, unless there's a cable issue, or it has some type of smart logic that drops the speed down, or something, but the ATA speeds are not synthesized at all, they are what the system reported, no math is done on them. I also have access to an older, but not super old, system, that is SATA 2 but shows 2 disks which are SATA 3 as SATA 3, so as usual with new data types, it's messy, inconsistent, and not super reliable.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
h2-1
Posts: 208
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#22 Post by h2-1 »

I've decided to make speed an -xx option instead of my original -x, it's not reliable enough for my taste. This thread confirmed that, since sometimes it's not there, as <unknown>, it's never there for usb/mmcblk, and it can be wrong or at least inconclusive, either showing as SATA 2 on a SATA 3 board, or as SATA 3 on a SATA 2 board, I can't consider this as a solid data type option. Thanks for the feedback.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
h2-1
Posts: 208
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#23 Post by h2-1 »

This is now out as inxi 3.0.10 by the way, as an -xx option for -D.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
h2-1
Posts: 208
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#24 Post by h2-1 »

If you have udevadm installed, disk rotation speed should now be working.

I had forgotten that I already use that to get the disk partition scheme data so I changed that logic a bit and now it also can try to get rotation speed. Obviously ssds do not have rotation speeds, and I have also found cases where specific spinning disks fail to report any speed as well, sometimes one does, and one doesn't, on the same system with two similar disks, but the rotation will now roughly work:

Code: Select all

pinxi -Dxxxz -y 80
Drives:
  HDD Total Size: 1.07 TiB used: 402.62 GiB (36.6%) 
  ID-1: /dev/sda vendor: Intel model: SSDSC2BW180A4 size: 167.68 GiB 
  speed: 3.0 Gb/s serial: <filter> rev: DC32 scheme: MBR 
  ID-2: /dev/sdb vendor: Western Digital model: WD1003FZEX-00MK2A0 
  size: 931.51 GiB speed: 3.0 Gb/s rotation: 7200 rpm serial: <filter> 
  rev: 1A01 temp: 26 C scheme: GPT
and so it goes, on and on...
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
stsoh
Posts: 183
Joined: Sun Aug 20, 2017 10:11 am

Re: Yet another new inxi feature: disk speeds!

#25 Post by stsoh »

great work.
data speed: unknown, mb sata2 can't read sata3 ssd/hdd.

Code: Select all

$ pinxi -Dxxxz -y 80
Drives:
  HDD Total Size: 3.75 TiB used: 1.94 TiB (51.9%) 
  ID-1: /dev/sda vendor: Toshiba model: Q300 size: 111.79 GiB speed: <unknown> 
  serial: <filter> rev: 11.2 scheme: MBR 
  ID-2: /dev/sdb vendor: Toshiba model: DT01ACA200 size: 1.82 TiB 
  speed: <unknown> rotation: 7200 rpm serial: <filter> rev: ABB0 scheme: MBR 
  ID-3: /dev/sdc vendor: Toshiba model: DT01ACA200 size: 1.82 TiB 
  speed: <unknown> rotation: 7200 rpm serial: <filter> rev: ABB0 scheme: MBR 
sudo hdparm -Tt /dev/sdx

Code: Select all

/dev/sda:
 Timing cached reads:   2614 MB in  2.00 seconds = 1307.98 MB/sec
 Timing buffered disk reads: 626 MB in  3.00 seconds = 208.47 MB/sec

/dev/sdb:
 Timing cached reads:   2544 MB in  2.00 seconds = 1272.57 MB/sec
 Timing buffered disk reads: 584 MB in  3.01 seconds = 194.19 MB/sec

/dev/sdc:
 Timing cached reads:   2560 MB in  2.00 seconds = 1281.08 MB/sec
 Timing buffered disk reads: 574 MB in  3.00 seconds = 191.09 MB/sec
MX-17.1_x64 Horizon, G41M-P33 Combo (MS-7592), Pentium E5400 (2706 MHz), 8Gb RAM (984 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.
Accepted Linux when i found MX-Linux in 2016.

User avatar
oops
Posts: 1594
Joined: Tue Apr 10, 2018 5:07 pm

Re: Yet another new inxi feature: disk speeds!

#26 Post by oops »

Hi,
Right it's interesting tool, pinxi -Dxxxz -y 80, I will test it.
Read speed (/ root MX17):
PS: the hdparm -T option is not interesting (depends of the ram/cache memory speed)

Code: Select all

/sbin/hdparm -t `df -P /root | awk 'END{print $1}'` # MX17 root

/dev/sda4:
 Timing buffered disk reads: 338 MB in  3.02 seconds = 112.09 MB/sec
But need also the Write speed (for 4k here)

Code: Select all

dd if=/dev/zero of=/tmp/TEST_100MB bs=4k count=25600 conv=fdatasync ; rm /tmp/TEST_100MB
25600+0 enregistrements lus
25600+0 enregistrements écrits
104857600 bytes (105 MB, 100 MiB) copied, 1,06275 s, 98,7 MB/s
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

User avatar
h2-1
Posts: 208
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#27 Post by h2-1 »

/sys data isn't as reliable, which is unfortunate since one of the points of making /sys is to provide easy access to this type of information.

It's unlikely I'd add the actual calculated read/write speeds at this point since that really requires a much more advanced disk logic than this, this was simply something I noticed was available in /sys which makes for an easy and fast (re exec time) feature. Disk rotation likewise is something that I happened to notice was available from (this is the command used as first choice for disk partition scheme):

udevadm info -q property -n sdx

Note that the hdparm -t option does actual read tests so it's very slow, that will never be part of default inxi output, though I could see it being part of some type of advanced options that do not normally run unless forced.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
oops
Posts: 1594
Joined: Tue Apr 10, 2018 5:07 pm

Re: Yet another new inxi feature: disk speeds!

#28 Post by oops »

... Maybe the test can be done only one time ?, to store as information (the read and the write results), to save the result with the UUID of each partition/disk to a text file until the UUID is valid.

Code: Select all

Under Root ( +serial:N/A + temps 30C)
# ./pinxi -Mdxxxzy80
Machine:
  Type: Desktop Mobo: MSI model: B75MA-E33 (MS-7808) v: 1.0 serial: N/A 
  UEFI: American Megatrends v: 1.7 date: 09/30/2013 
Drives:
  HDD Total Size: 931.51 GiB used: 430.70 GiB (46.2%) 
  ID-1: /dev/sda vendor: Seagate model: ST31000524AS size: 931.51 GiB 
  speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: HP64 temp: 30 C 
  scheme: GPT 
  Message: No Optical or Floppy data was found. 
  
#USER
$ ./pinxi -Mdxxxzy80
Machine:
  Type: Desktop Mobo: MSI model: B75MA-E33 (MS-7808) v: 1.0 serial: <filter> 
  UEFI: American Megatrends v: 1.7 date: 09/30/2013 
Drives:
  HDD Total Size: 931.51 GiB used: 430.70 GiB (46.2%) 
  ID-1: /dev/sda vendor: Seagate model: ST31000524AS size: 931.51 GiB 
  speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: HP64 scheme: GPT 
  Message: No Optical or Floppy data was found. 

./pinxi -U
Currently running pinxi version number: 3.0.10
Current version patch number: 28
Current version release date: 2018-05-30
Last edited by oops on Thu May 31, 2018 7:41 pm, edited 2 times in total.
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

User avatar
h2-1
Posts: 208
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#29 Post by h2-1 »

No particular reason to overthink it, a feature like this would only be tripped if and only if it were specifically requested. Somewhat like the brand new --admin option (currently only supports -C). Also, in reading the hdparm man, it notes specifically, and obviously correctly, that this type of test actually needs to be run a few times in a row because any non related disk activity re I/O will impact the results.

the test to see actual write speeds however I feel fairly solid in saying it will never be implemented, though it is an interesting idea, basically because except for log files, I don't think inxi has any business writing to the user's disks.

I will however add both suggestions/methods to https://github.com/smxi/inxi/issues/134 the nice to have feature request issue on github, that's a good place to put stuff that seems interesting but not likely to be implemented in the near future, but which might form a future feature group etc.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
h2-1
Posts: 208
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#30 Post by h2-1 »

While I did add the read/write methods to the ongoing future issues item, it struck me that a few things are fundamentally wrong with the dd method:
1: it's writing to a file system. File systems have different overheads, so it's not actually related to the disk per se, but to the file system ON the disk, which itself has speed differences depending on the file system. You could see this by comparing say an ext3, ext4, xfs, zfs partition on the same disk to see what the actual variances are, but they will certainly not map 1 to 1 between file systems. Some read faster, some write faster, some delete faster, etc.

2: It would only apply to a single partition. For spinning disks, this matters, since where the data occurs on the disk actually impacts the speeds, if I remember right. So on a purely technical level, this one doesn't really work in terms of getting true disk write speeds, nor can I see any way to get that data, since it has to write to a file system always, and thus you are measuring the disk raw capacity minus the filesystem overhead and read/write performance.

3: you'd need to know the native block size of the disk and the file system (I think, not positive about the latter), which gets messy. this data can actually be found in /sys, I was looking at that for an advanced disk size feature, in the future, it would be part of an --admin -D disk report I think, if it appears.

4: The bright side however is that if you reversed the test, that is, create the file, get the write speeds, then time how long it takes to grab the file from disk, then delete it, you'd end up with a quite accurate live performance metric, without having to use hdparm or root at all.

But it is a neat trick anyway, which I thought was worth keeping, since it can be run as user, but it would need to know many things, like which disk the partition actually is on, so, again, unlikely to be added since it's not really related to Disk or Partition directly, but both, it's actually something else.

https://www.thomas-krenn.com/en/wiki/Li ... s_using_dd that's a good technical overview of dd re write speeds, one thing that you'll notice is the radical speed differences based on 1 big block written vs 1000 small blocks, which again goes to show, write speed means almost nothing until you know what the actual original method used was, and the filesystem, and block size, etc. But that also suggests a much more granular test approach, very large blocks to get bulk write speeds, very small ones multiplied many times to see more realistic normal operation write speeds, which would also probably say as much about the filesystem as the disk itself.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

Post Reply

Return to “antiX”