Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

4 votes
2 answers
6641 views
linux stress, impose work on specific disks
Have a server running centos 7.6, and it has 4 ssd's as Raid-0 mounted as `/scratch/` I have the linux program `stress-1.0.4-16` and I just learned `stress-ng` existed. Is there a way with `stress` to tell it to do I/O operations to stress a specific set of disks such as my 4 disk Raid-0? Or does it...
Have a server running centos 7.6, and it has 4 ssd's as Raid-0 mounted as /scratch/ I have the linux program stress-1.0.4-16 and I just learned stress-ng existed. Is there a way with stress to tell it to do I/O operations to stress a specific set of disks such as my 4 disk Raid-0? Or does it only work on whatever the root file system is such as /tmp? And if that's the case I've done systemctl enable tmp.mount which means the /tmp folder is no longer on disk negating the disk i/o function of stress ?
ron (8647 rep)
Jan 22, 2020, 04:36 PM • Last activity: Aug 6, 2025, 11:09 AM
1 votes
1 answers
1020 views
How can one use Nvidia RTX IO on Linux to allow the GPU to directly access the storage (SSD) with only a slight CPU overhead?
I saw in the [2020-09-01 Official Launch Event for the NVIDIA GeForce RTX 30 Series](https://youtu.be/E98hC9e__Xs?t=1436) that the RTX IO in the [Nvidia GeForce RTX 30 Series](https://en.wikipedia.org/wiki/GeForce_30_series) allows the GPU to directly access the storage (SSD) with only a slight CPU...
I saw in the [2020-09-01 Official Launch Event for the NVIDIA GeForce RTX 30 Series](https://youtu.be/E98hC9e__Xs?t=1436) that the RTX IO in the [Nvidia GeForce RTX 30 Series](https://en.wikipedia.org/wiki/GeForce_30_series) allows the GPU to directly access the storage (SSD) with only a slight CPU overhead when using Microsoft DirectStorage (see screenshot below). How can one use RTX IO on Linux? enter image description here
Franck Dernoncourt (5533 rep)
Sep 8, 2020, 01:36 AM • Last activity: Aug 4, 2025, 05:21 PM
2 votes
2 answers
2272 views
I/O errors and undeletable directories
For some unknown reason, there are 2 directories I can't delete. First directory called **sw.old** is empty and can be deleted only by `rm`, as `rmdir` won't recognize it. However, even after `rm`, it still shows up: [02:11:36] user@user:/media/user/exthdd/docs$ ls -il total 1072064 1456 drwx------...
For some unknown reason, there are 2 directories I can't delete. First directory called **sw.old** is empty and can be deleted only by rm, as rmdir won't recognize it. However, even after rm, it still shows up: [02:11:36] user@user:/media/user/exthdd/docs$ ls -il total 1072064 1456 drwx------ 1 user user 0 Aug 12 10:04 1old.or.probably.unfinished 5717 drwx------ 1 user user 8192 Jan 27 22:58 videos 6528 -rw------- 1 user user 1097779088 Nov 5 16:15 release_Remix_OS_for_PC_Android_M_64bit_B2016112101.zip 8008 drwx------ 1 user user 4096 Jan 28 00:55 txt 64 drwx------ 1 user user 0 Dec 25 22:15 sw.old [02:12:03] user@user:/media/user/exthdd/docs$ rmdir sw.old/ rmdir: failed to remove ‘sw.old/’: No such file or directory [02:12:57] user@user:/media/user/exthdd/docs$ rm -rf sw.old/ [02:13:15] user@user:/media/user/exthdd/docs$ ls -il total 1072064 1456 drwx------ 1 user user 0 Aug 12 10:04 1old.or.probably.unfinished 5717 drwx------ 1 user user 8192 Jan 27 22:58 videos 6528 -rw------- 1 user user 1097779088 Nov 5 16:15 release_Remix_OS_for_PC_Android_M_64bit_B2016112101.zip 8008 drwx------ 1 user user 4096 Jan 28 00:55 txt 64 drwx------ 1 user user 0 Dec 25 22:15 sw.old Second one called **misc** has a corrupted file inside it: [02:24:32] user@user:/media/user/exthdd/docs/txt$ ls -il total 0 22607 drwx------ 1 user user 0 Dec 31 16:09 misc [02:24:36] user@user:/media/user/exthdd/docs/txt$ ls -il misc/ ls: cannot access misc/patterns.mp4: Input/output error total 0 ? -????????? ? ? ? ? ? patterns.mp4 [02:24:54] user@user:/media/user/exthdd/docs/txt$ rm -rf misc/ rm: cannot remove ‘misc/patterns.mp4’: Input/output error How can I remove those directories (and corrupted file inside one of them) without formatting?
PKM (131 rep)
Jan 28, 2018, 12:40 AM • Last activity: Jul 28, 2025, 07:02 PM
0 votes
2 answers
3319 views
Isolating I/O issue with NVME or hardware?
Hardware: - Samsung 980 PRO M.2 NVMe SSD (MZ-V8P2T0BW) (2TB) - Beelink GTR6, with the SSD in the NVMe slot Since the hardware arrived, I've installed Ubuntu Server on it as well as a bunch of services (mostly in docker, DBs and services like Kafka). After 2-3 days of uptime (record is almost a week,...
Hardware: - Samsung 980 PRO M.2 NVMe SSD (MZ-V8P2T0BW) (2TB) - Beelink GTR6, with the SSD in the NVMe slot Since the hardware arrived, I've installed Ubuntu Server on it as well as a bunch of services (mostly in docker, DBs and services like Kafka). After 2-3 days of uptime (record is almost a week, but usually it's 2-3 days), I typically start getting buffer i/o errors on the nvme slot (which is also the boot drive): screen1 If I'm quick enough, I can still login via SSH but the system becomes increasingly unstable before commands start failing with an I/O error. When I did manage to login, it did seem to think there's no connected NVME SSDs: screen2 Another instance of the buffer I/O error on the nvme slot: screen3 Because of this and trying to check everything I could find, I ran FSCK on boot to see if there was anything obvious - this is quite common after the hard reset: # cat /run/initramfs/fsck.log Log of fsck -C -f -y -V -t ext4 /dev/mapper/ubuntu--vg-ubuntu--lv Fri Dec 30 17:26:21 2022 fsck from util-linux 2.37.2 [/usr/sbin/fsck.ext4 (1) -- /dev/mapper/ubuntu--vg-ubuntu--lv] fsck.ext4 -f -y -C0 /dev/mapper/ubuntu--vg-ubuntu--lv e2fsck 1.46.5 (30-Dec-2021) /dev/mapper/ubuntu--vg-ubuntu--lv: recovering journal Clearing orphaned inode 524449 (uid=1000, gid=1000, mode=0100664, size=6216) Pass 1: Checking inodes, blocks, and sizes Inode 6947190 extent tree (at level 1) could be shorter. Optimize? yes Inode 6947197 extent tree (at level 1) could be shorter. Optimize? yes Inode 6947204 extent tree (at level 1) could be shorter. Optimize? yes Inode 6947212 extent tree (at level 1) could be shorter. Optimize? yes Inode 6947408 extent tree (at level 1) could be shorter. Optimize? yes Inode 6947414 extent tree (at level 1) could be shorter. Optimize? yes Inode 6947829 extent tree (at level 1) could be shorter. Optimize? yes Inode 6947835 extent tree (at level 1) could be shorter. Optimize? yes Inode 6947841 extent tree (at level 1) could be shorter. Optimize? yes Pass 1E: Optimizing extent trees Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Free blocks count wrong (401572584, counted=405399533). Fix? yes Free inodes count wrong (121360470, counted=121358242). Fix? yes /dev/mapper/ubuntu--vg-ubuntu--lv: ***** FILE SYSTEM WAS MODIFIED ***** /dev/mapper/ubuntu--vg-ubuntu--lv: 538718/121896960 files (0.2% non-contiguous), 82178067/487577600 blocks fsck exited with status code 1 Fri Dec 30 17:26:25 2022 ---------------- Running smart-log doesn't seem to show anything concerning, other than the number of unsafe shutdowns (the number of times this has happened so far)... # nvme smart-log /dev/nvme0 Smart Log for NVME device:nvme0 namespace-id:ffffffff critical_warning : 0 temperature : 32 C (305 Kelvin) available_spare : 100% available_spare_threshold : 10% percentage_used : 0% endurance group critical warning summary: 0 data_units_read : 8,544,896 data_units_written : 5,175,904 host_read_commands : 39,050,379 host_write_commands : 191,366,905 controller_busy_time : 1,069 power_cycles : 21 power_on_hours : 142 unsafe_shutdowns : 12 media_errors : 0 num_err_log_entries : 0 Warning Temperature Time : 0 Critical Composite Temperature Time : 0 Temperature Sensor 1 : 32 C (305 Kelvin) Temperature Sensor 2 : 36 C (309 Kelvin) Thermal Management T1 Trans Count : 0 Thermal Management T2 Trans Count : 0 Thermal Management T1 Total Time : 0 Thermal Management T2 Total Time : 0 I have reached out to support and their initial suggestion along with a bunch of questions was whether I had tried to reinstall the OS. I've given this a go too, formatting the drive and reinstalling the OS (Ubuntu Server 22 LTS). After that, the issue hadn't happened for 4 days before it finally showed itself as a kernel panic: enter image description here Any ideas what I can do to identify if the problem is with the SSD itself or the hardware that the SSD is slotted into (the GTR6)? I have until the 31st to return the SSD, so would love to pin down the most likely cause of the issue sooner rather than later... I'm even more concerned after seeing reports that others are having serious health issues with the Samsung 990 Pro: https://www.reddit.com/r/hardware/comments/10jkwwh/samsung_990_pro_ssd_with_rapid_health_drops/ Edit: although I realised those reported issues are with the 990 pro, not the 980 pro that I have! Edit2: someone in overclockers was kind enough to suggest hd sentinel, which does show a health metric, which seems ok: # ./hdsentinel-019c-x64 Hard Disk Sentinel for LINUX console 0.19c.9986 (c) 2021 info@hdsentinel.com Start with -r [reportfile] to save data to report, -h for help Examining hard disk configuration ... HDD Device 0: /dev/nvme0 HDD Model ID : Samsung SSD 980 PRO 2TB HDD Serial No: S69ENL0T905031A HDD Revision : 5B2QGXA7 HDD Size : 1907729 MB Interface : NVMe Temperature : 41 °C Highest Temp.: 41 °C Health : 99 % Performance : 100 % Power on time: 21 days, 12 hours Est. lifetime: more than 1000 days Total written: 8.30 TB The status of the solid state disk is PERFECT. Problematic or weak sectors were not found. The health is determined by SSD specific S.M.A.R.T. attribute(s): Available Spare (Percent), Percentage Used No actions needed. Lastly, none of the things I tried such as the smart-log seem to show something like a health metric. How can I check this in ubuntu? Thanks!
Tiago (101 rep)
Jan 26, 2023, 10:57 AM • Last activity: Jul 18, 2025, 09:03 AM
3 votes
2 answers
3541 views
Two (different) BW numbers in fio output!
fio output shows two bandwidth numbers at two places (for both read and write). What does these two numbers indicate? Which one should be considered for throughput test and for what the other one should be considered? 1 {JOB}:{1}_{4k}_{5}: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4...
fio output shows two bandwidth numbers at two places (for both read and write). What does these two numbers indicate? Which one should be considered for throughput test and for what the other one should be considered? 1 {JOB}:{1}_{4k}_{5}: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodep th=32 2 ... 3 fio-3.1 4 Starting 16 threads 5 6 {JOB}:{1}_{4k}_{5}: (groupid=0, jobs=16): err= 0: pid=143919: Thu Oct 10 18:35:14 2019 7 read: IOPS=50.1k, BW=196MiB/s (205MB/s)(34.4GiB/180002msec) 8 slat (nsec): min=1210, max=191233, avg=3335.76, stdev=1810.98 9 clat (usec): min=166, max=16660, avg=695.21, stdev=319.44 10 lat (usec): min=169, max=16662, avg=698.62, stdev=319.39 11 clat percentiles (usec): 12 | 1.00th=[ 338], 5.00th=[ 396], 10.00th=[ 433], 20.00th=[ 482], 13 | 30.00th=[ 515], 40.00th=[ 537], 50.00th=[ 570], 60.00th=[ 685], 14 | 70.00th=[ 832], 80.00th=[ 914], 90.00th=[ 1012], 95.00th=[ 1188], 15 | 99.00th=[ 1532], 99.50th=[ 2057], 99.90th=[ 3490], 99.95th=[ 3884], 16 | 99.99th=[ 5997] 17 bw ( KiB/s): min= 5883, max=16873, per=6.26%, avg=12545.77, stdev=3041.02, samples=5760 18 iops : min= 1470, max= 4218, avg=3136.15, stdev=760.26, samples=5760 19 write: IOPS=952k, BW=3720MiB/s (3901MB/s)(654GiB/180002msec) 20 slat (nsec): min=1192, max=927014, avg=3640.66, stdev=1926.60 21 clat (usec): min=98, max=10023, avg=496.01, stdev=170.79 22 lat (usec): min=100, max=10025, avg=499.72, stdev=170.69 23 clat percentiles (usec): 24 | 1.00th=[ 273], 5.00th=[ 326], 10.00th=[ 355], 20.00th=[ 388], 25 | 30.00th=[ 420], 40.00th=[ 445], 50.00th=[ 457], 60.00th=[ 474], 26 | 70.00th=[ 486], 80.00th=[ 510], 90.00th=[ 865], 95.00th=[ 930], 27 | 99.00th=[ 1004], 99.50th=[ 1029], 99.90th=[ 1188], 99.95th=[ 1287], 28 | 99.99th=[ 1467] 29 bw ( KiB/s): min=121170, max=307136, per=6.26%, avg=238474.82, stdev=57541.32, samples=5760 30 iops : min=30292, max=76784, avg=59618.41, stdev=14385.36, samples=5760 31 lat (usec) : 100=0.01%, 250=0.25%, 500=73.65%, 750=12.84%, 1000=11.71% 32 lat (msec) : 2=1.52%, 4=0.02%, 10=0.01%, 20=0.01% 33 cpu : usr=6.39%, sys=33.77%, ctx=40608436, majf=0, minf=11562 34 IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=100.0%, >=64=0.0% 35 submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% 36 complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0% 37 issued rwt: total=9019565,171442027,0, short=0,0,0, dropped=0,0,0 38 latency : target=0, window=0, percentile=100.00%, depth=32 39 40 Run status group 0 (all jobs): 41 READ: bw=196MiB/s (205MB/s), 196MiB/s-196MiB/s (205MB/s-205MB/s), io=34.4GiB (36.9GB), run=180002-180002msec 42 WRITE: bw=3720MiB/s (3901MB/s), 3720MiB/s-3720MiB/s (3901MB/s-3901MB/s), io=654GiB (702GB), run=180002-180002mse c 43 44 Disk stats (read/write): 45 nvme1n1: ios=9013394/171326957, merge=0/0, ticks=6201303/82738341, in_queue=103287914, util=100.00% For example, for read, following are the relevant lines 7: read: IOPS=50.1k, BW=196MiB/s (205MB/s)(34.4GiB/180002msec) 17: bw ( KiB/s): min= 5883, max=16873, per=6.26%, avg=12545.77, stdev=3041.02, samples=5760 41: READ: bw=196MiB/s (205MB/s), 196MiB/s-196MiB/s (205MB/s-205MB/s), io=34.4GiB (36.9GB), run=180002-180002msec What does the "BW" in line 7 tells and what does the "bw" in line 17 tells? How are they different? For throughput test, which one should be considered?
user3488903 (183 rep)
Oct 11, 2019, 10:37 AM • Last activity: Jul 3, 2025, 12:02 PM
3 votes
2 answers
2217 views
crontab command fails to create temporary directory
On two of my VMs the `crontab -e` command fails to create a directory in `/tmp` but it works with `mkdir`: ``` /tmp/crontab.oxyaBy: Input/output error Creation of temporary crontab file failed - aborting ``` strace output: ``` root@vm:~# strace crontab -e mkdir("/tmp/crontab.1SuJe9", 0700) = -1 EIO...
On two of my VMs the crontab -e command fails to create a directory in /tmp but it works with mkdir:
/tmp/crontab.oxyaBy: Input/output error
Creation of temporary crontab file failed - aborting
strace output:
root@vm:~# strace crontab -e
mkdir("/tmp/crontab.1SuJe9", 0700)      = -1 EIO (Input/output error)

root@vm:~# strace mkdir /tmp/crontab.1SuJe9 -m 700
mkdir("/tmp/crontab.1SuJe9", 0700)      = 0
Both VMs are running Ubuntu 16.04.6 LTS (4.4.0-173-generic x86_64) This is reproducible every time and the problem persists after reboots, fsck says everything is fine and there are no other issues on this VMs. I already tried to reinstall the cron package but nothing changed. Any ideas? Thank you! **Edit:** dmesg shows
EXT4-fs (dm-0): Quota write (off=4080, len=40) cancelled because not block aligned
Quota error (device dm-0): v1_commit_dqblk: dquota write failed
The crontab command works with quotaoff but I still would love to know why crontab and mkdir behave differently...
Anatol - user3173842 (143 rep)
May 4, 2020, 12:43 PM • Last activity: Jun 24, 2025, 08:07 AM
55 votes
1 answers
65075 views
Why is most the of disk IO attributed to jbd2 and not to the process that is actually using the IO?
When monitoring disk IO, most of the IO is attributed to jbd2, while the original process that caused the high IO is attributed a much lower IO percentage. Why? Here's `iotop`'s example output (other processes with IO<1% omitted): [![enter image description here][1]][1] [1]: https://i.sstatic.net/T6...
When monitoring disk IO, most of the IO is attributed to jbd2, while the original process that caused the high IO is attributed a much lower IO percentage. Why? Here's iotop's example output (other processes with IO<1% omitted): enter image description here
Sparkler (1109 rep)
Feb 8, 2017, 11:24 PM • Last activity: Jun 24, 2025, 08:01 AM
31 votes
2 answers
21612 views
iotop showing 1.5 MB/s of disk write, but all programs have 0.00 B/s
I don't understand `iotop` output: it shows ~1.5 MB/s of disk write (top right), but all programs have 0.00 B/s. Why? [![enter image description here][1]][1] The video was taken as I was deleting the content of a folder with a few millions of files [using](https://unix.stackexchange.com/a/79656/1670...
I don't understand iotop output: it shows ~1.5 MB/s of disk write (top right), but all programs have 0.00 B/s. Why? enter image description here The video was taken as I was deleting the content of a folder with a few millions of files [using](https://unix.stackexchange.com/a/79656/16704) perl -e 'for(){((stat)<(unlink))}', on Kubuntu 14.04.3 LTS x64. iotop was launched using sudo iotop.
Franck Dernoncourt (5533 rep)
Dec 8, 2015, 10:17 PM • Last activity: Jun 9, 2025, 06:06 PM
0 votes
1 answers
2645 views
Linux Mint jdb2 continuous writing to disk
Captured disk activity from last 2 days using below command but unable to find out why it is writing so much (426MB) on root partition iotop -oPa -d 2 Total DISK READ : 0.00 B/s | Total DISK WRITE : 0.00 B/s Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 0.00 B/s PID PRIO USER DISK READ DISK WRITE...
Captured disk activity from last 2 days using below command but unable to find out why it is writing so much (426MB) on root partition iotop -oPa -d 2 Total DISK READ : 0.00 B/s | Total DISK WRITE : 0.00 B/s Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 0.00 B/s PID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND 239 be/3 root 0.00 B 426.21 M 0.00 % 0.17 % [jbd2/sdd2-8] 2678 be/4 root 961.21 M 107.91 M 0.00 % 0.03 % 2198 be/4 root 0.00 B 0.00 B 0.00 % 0.02 % udisksd --no-debug 6402 be/4 root 16.00 K 0.00 B 0.00 % 0.07 % [kworker/u4:1] 13162 be/4 root 16.00 K 0.00 B 0.00 % 0.09 % [kworker/u4:2] I have below disk /dev/sdd2 on / type ext4 (rw,noatime,errors=remount-ro) /dev/sda1 on /media//2TB_EXT4 type ext4 (rw,nosuid,nodev,noatime,uhelper=udisks2) /dev/sdb1 on /media//2TB_EXT4_2 type ext4 (rw,nosuid,nodev,noatime,uhelper=udisks2)
kr.pradeep (1 rep)
Nov 16, 2017, 12:47 PM • Last activity: Jun 7, 2025, 05:05 PM
1 votes
1 answers
2956 views
how to run fio verify reliably in linux
I am using `fio` over disks exposed through iscsi. I am giving these params in `fio` ``` fio --name=randwrite --ioengine=libaio --iodepth=64 --rw=randrw --rwmixread=50 --bs=4k-2M --direct=1 -filename=data --numjobs=1 --runtime 36000 --verify=md5 --verify_async=4 --verify_backlog=100000 --verify_dump...
I am using fio over disks exposed through iscsi. I am giving these params in fio
fio --name=randwrite --ioengine=libaio --iodepth=64 --rw=randrw --rwmixread=50  --bs=4k-2M --direct=1 -filename=data --numjobs=1 --runtime 36000 --verify=md5 --verify_async=4 --verify_backlog=100000 --verify_dump=1 --verify_fatal=1 --time_based --group_reporting
With the above parameters can fio send overlap concurrent writes of size more than page size. If yes, then how does fio verify the checksum because atomicity of io is not guaranteed across page size.
rishabh mittal (31 rep)
Jul 27, 2019, 04:52 AM • Last activity: Jun 5, 2025, 02:06 AM
0 votes
2 answers
44 views
when opening a FIFO for reading+writing, and blocking - how to tell if other side opened for reading or writing?
If I open a fifo for reading+writing in blocking mode: fd = open("foo", "O_RDWR"); Then it blocks until someone on the other end opens it for either reading or writing. But how do I know which? if(???) { read(fd, .......); } else { write(fd, ......); } close(fd); (I need that close, because if I am...
If I open a fifo for reading+writing in blocking mode: fd = open("foo", "O_RDWR"); Then it blocks until someone on the other end opens it for either reading or writing. But how do I know which? if(???) { read(fd, .......); } else { write(fd, ......); } close(fd); (I need that close, because if I am writing I need to send an EOF to the other end. And any writer will send a single line through and close, so I also need to close if I read.) What do I put instead of the ??? to figure out what the other end did? Is non-blocking and select() my only option? Is there a way to inspect fd and see if it's ready for reading or writing?
Ariel (117 rep)
May 30, 2025, 06:30 PM • Last activity: May 31, 2025, 06:15 AM
0 votes
0 answers
54 views
disabling I8042 driver completely
"i8042 is still probing even though I disabled CONFIG_SERIO_I8042. Does it have dependent configurations? Even after passing kernel command-line arguments: i8042.nopnp i8042.noaux , I still see an entry at /sys/bus/serio/devices/serio0."
"i8042 is still probing even though I disabled CONFIG_SERIO_I8042. Does it have dependent configurations? Even after passing kernel command-line arguments: i8042.nopnp i8042.noaux , I still see an entry at /sys/bus/serio/devices/serio0."
Malin Shaik (11 rep)
Apr 28, 2025, 05:16 PM
1 votes
1 answers
2323 views
Desktop completely freezing on I/O operations
In my old system, I was already having desktop freezes on some heavy I/O operations like `apt-get dist-upgrade` and copying 4 GB video files. But now, it has become a lot worse: any `apt-get install` is enough the freeze the whole desktop, and copying the videos with `nice -c 3` does not help at all...
In my old system, I was already having desktop freezes on some heavy I/O operations like apt-get dist-upgrade and copying 4 GB video files. But now, it has become a lot worse: any apt-get install is enough the freeze the whole desktop, and copying the videos with nice -c 3 does not help at all, I cannot do any operation for minutes. According to man ionice, **the impact of an idle I/O process on normal system activity should be zero.** One weird swap problem appeared as well: I had disabled the swap partition, and twice an OOM was triggered. But instead of killing the process that trigerred the OOM (I set vm.oom_kill_allocating_task=1), the disk started spinning and totally froze the desktop for a long time, although I had run sudo swapoff -a and checked whether it worked. The old hardware and system: * Hard drive: 500 GB Toshiba * System: Debian 7.9 (32 bits) * Kernel: 3.15.10-zen-686 (Liquorix) * Disk scheduler: BFQ * Filesystem: ext4 The new hardware and system: * Hard drive: 1 TB Samsung * System: Ubuntu 15.10 (64 bits) * Kernel: 4.2.0-30-generic * Disk scheduler: Deadline (default) * Filesystem: encrypted LVM with Btrfs I have found many people who have solved similar problems by changing from the CFQ scheduler to Deadline, but Deadline is the default on the Ubuntu kernel. And I already had problems with the supposedly fast BFQ disk scheduler with no encryption.
admirabilis (4792 rep)
Feb 25, 2016, 02:48 PM • Last activity: Apr 22, 2025, 07:04 PM
0 votes
1 answers
1934 views
Buffer I/O error on /dev/sda2, running fsck.hfsplus returns OK
At the moment, I'm mounting a USB hard drive running HFS+ on a Raspberry Pi 3 at boot to be writable. Not 100% sure what I did, but the drive is suddenly throwing up errors such as `Buffer I/O error on dev sda2, logical block 18266273, async page read` while I'm trying to stream via Plex. Following...
At the moment, I'm mounting a USB hard drive running HFS+ on a Raspberry Pi 3 at boot to be writable. Not 100% sure what I did, but the drive is suddenly throwing up errors such as Buffer I/O error on dev sda2, logical block 18266273, async page read while I'm trying to stream via Plex. Following up on the suggestion from dmesg I installed and ran fsck.hfsplus, but fsck is simply returning The volume Tom's Disk appears to be OK. every time. I've also run it through First Aid on Disk Utility on my Mac, and got similar results. I'm kind of at a loss because the drive seems to be fine, but I can't stop Filesystem was not cleanly unmounted, running fsck.hfsplus is recommended. mounting read-only. messages. Is there any way of telling Ubuntu that the drive is fine? Seems to be the only reason why Plex won't play my media right now...
Tom Sykes (1 rep)
Sep 18, 2017, 07:17 PM • Last activity: Apr 20, 2025, 08:06 PM
2 votes
0 answers
43 views
dm-crypt IOPS amplification
I have a ZFS pool comprising a mirror comprising two partitions encypted with `dm-crypt`. ``` $ zpool list -v data2 NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT data2 3.6T 1.00T 2.6T - - 0% 27% 1.00x ONLINE - mirror-0 3.6T 1.00T 2.6T - - 0% 27.5% - ONLINE luks-aaaaaaaaaaaaaaaa...
I have a ZFS pool comprising a mirror comprising two partitions encypted with dm-crypt.
$ zpool list -v data2
NAME                        SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
data2                       3.6T  1.00T   2.6T        -         -     0%    27%  1.00x    ONLINE  -
  mirror-0                  3.6T  1.00T   2.6T        -         -     0%  27.5%      -    ONLINE
    luks-aaaaaaaaaaaaaaaa   3.6T      -      -        -         -      -      -      -    ONLINE
    luks-bbbbbbbbbbbbbbbb   3.6T      -      -        -         -      -      -      -    ONLINE
I've been using iostat to monitor performance while scrubbing and noticed something funny about the IOPS figures:
$ iostat -dxy -N --human sda sdb dm-2 dm-3 10
[...]
Device            r/s     rkB/s   rrqm/s  %rrqm r_await rareq-sz     w/s     wkB/s   wrqm/s  %wrqm w_await wareq-sz     d/s     dkB/s   drqm/s  %drqm d_await dareq-sz     f/s f_await  aqu-sz  %util
dm-2          1862.50    232.5M     0.00   0.0%   11.22   127.8k   11.00    159.2k     0.00   0.0%    1.23    14.5k    0.00      0.0k     0.00   0.0%    0.00     0.0k    0.00    0.00   20.92  99.7%
dm-3          1859.80    232.2M     0.00   0.0%   11.21   127.8k   11.20    159.2k     0.00   0.0%    1.39    14.2k    0.00      0.0k     0.00   0.0%    0.00     0.0k    0.00    0.00   20.86  99.3%
sda            468.10    232.5M  1394.10  74.9%   10.73   508.6k   11.00    159.2k     0.00   0.0%    1.08    14.5k    0.00      0.0k     0.00   0.0%    0.00     0.0k    0.40    8.75    5.04  81.5%
sdb            467.00    232.2M  1392.50  74.9%   10.70   509.1k   11.20    159.2k     0.00   0.0%    1.27    14.2k    0.00      0.0k     0.00   0.0%    0.00     0.0k    0.40   12.25    5.02  81.8%
The rkB/s (data read per second) match between each device mapper device and its underlying disk. This is as expected. But the r/s (reads per second) column looks rather strange... If I understand correctly, I'm getting ~450 IOPS out of each disk. But are ~1800 IOPS recorded for each device mapper device! I'd have thought that reading a single disk block from the device mapper device would correspond to reading a single block from the underling device... Here's a graph of the IOPS over time. Orange/Blue lines are the disks, Yellow/Green lines are the dm-crypt devices. Read IOPS Another interesting thing is that the operations rate on one disk is dropping during the scrub, but not the other. Maybe that's fine, I don't know whether the layout of data on a device in a mirror vdev is literally mirrored or whether each device can have data laid out differently. But the other weird thing is that the IOPS of both device mapper devices are idential, rather than one being some multiple of one disk, and the other the same multiple of the other... My only idea is that this is something to do with differing physical sector sizes of the disks (4096), logical sizes (512) and the ZFS pool's ashift parameter (which I set to 12 to match the physical sector size of the disks). But 1800 is ~4× 470, not 8×, so I don't see the direct relation between the two figures...
Sam Morris (1355 rep)
Apr 17, 2025, 09:32 AM • Last activity: Apr 17, 2025, 11:03 AM
45 votes
7 answers
25495 views
Measure pipe throughput in the shell
There is a shell command that allows you to measure how fast the data goes through it, so you can measure the speed of output of commands in a pipe. So instead of: $ somecommand | anothercommand you can do something like: $ somecommand | ??? | anothercommand And throughput stats (bytes/sec) are prin...
There is a shell command that allows you to measure how fast the data goes through it, so you can measure the speed of output of commands in a pipe. So instead of: $ somecommand | anothercommand you can do something like: $ somecommand | ??? | anothercommand And throughput stats (bytes/sec) are printed to stderr, I think. But I can't for the life of me remember what that command was.
Alex B (4598 rep)
Sep 3, 2010, 06:06 AM • Last activity: Apr 14, 2025, 11:32 AM
1 votes
1 answers
1166 views
UIO instance of a device-tree subnode
I have the following device-tree node which is auto generated by Xilinx PetaLinux in a proper dtsi file (which cannot be modified): axi_dma_0: dma@a0000000 { #dma-cells = ; clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_s2mm_aclk"; clocks = , , ; compatible = "xlnx,axi-dma-7.1", "xlnx,axi-...
I have the following device-tree node which is auto generated by Xilinx PetaLinux in a proper dtsi file (which cannot be modified): axi_dma_0: dma@a0000000 { #dma-cells = ; clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_s2mm_aclk"; clocks = , , ; compatible = "xlnx,axi-dma-7.1", "xlnx,axi-dma-1.00.a"; interrupt-names = "s2mm_introut"; interrupt-parent = ; interrupts = ; reg = ; xlnx,addrwidth = ; xlnx,include-sg ; xlnx,sg-length-width = ; dma-channel@a0000030 { compatible = "xlnx,axi-dma-s2mm-channel"; dma-channels = ; interrupts = ; xlnx,datawidth = ; xlnx,device-id = ; }; } To give access to the whole AXI DMA hardware from UIO, the following code can be used from another custom file that PetaLinux accounts for: &axi_dma_0 { compatible = "generic-uio"; linux,uio-name = "axi_dma"; }; What I would like to do is to give UIO access only to the dma-channel sub-node instead of the whole AXI DMA. To do this I tried something as this: &axi_dma_0 { dma-channel@a0000030 { compatible = "generic-uio"; linux,uio-name = "axi_dma_s2mm"; }; }; Or adding reg space declaration to dma-channel subnode: &axi_dma_0 { dma-channel@a0000030 { reg = ; compatible = "generic-uio"; linux,uio-name = "axi_dma_s2mm"; }; }; Among others... I cannot make it to create the /dev/uioX file.. What is wrong or what am I missing to make it work, or understand why it is not possible (if so) ?
xyx (797 rep)
Feb 9, 2022, 05:59 PM • Last activity: Apr 2, 2025, 06:38 PM
2 votes
1 answers
128 views
How to tune BFQ schduler to prevent a single low priority process from severely degrading system performance?
I have been trying to use nice/ionice for a while and it turns out that bfq ignores ionice parameters. So how do I prevent a low priority process from consuming all the io bandwith to the detriment of high priority processes? Even `nice -n -20 high_priority_cmd;nice -n 19 low_priority_cmd;taskset -a...
I have been trying to use nice/ionice for a while and it turns out that bfq ignores ionice parameters. So how do I prevent a low priority process from consuming all the io bandwith to the detriment of high priority processes? Even nice -n -20 high_priority_cmd;nice -n 19 low_priority_cmd;taskset -a -p 1 $(pgrep high_priority_cmd);taskset -a -p 2 $(pgrep low_priority_cmd); will result in the high_priority_cmd suffering severe latency/bandwidth issues for as long as low_priority_cmd runs. Some [documentation](https://github.com/torvalds/linux/blob/master/Documentation/block/bfq-iosched.rst#per-process-ioprio-and-weight) mentions a per process ioprio but provides no mention of how to change it. [Likely the same issue](https://unix.stackexchange.com/q/164244/529119) , with no answers that actually address the fundamental problem. There are no background services taking up io, cpu, memory, or swap. Just vlc and ffmpeg, if ffmpeg is running then vlc becomes next to unresponsive and I have to play videos at 0.5x speed to prevent skips, stalls, and garbled async(?) decoding. However if I do have lots of cpu and memory intensive services in the background then some thing as simple as md5suming a 1 GB file can stall the system to the point that not even the mouse will move on the screen. Windows OS has never had these issues with shitty incompetent IO scheduling (though to be fair my Windows system has an SSD instead of an HDD, but that is no excuse for incompetence).
Morrison (21 rep)
Nov 15, 2023, 02:56 AM • Last activity: Mar 11, 2025, 12:19 PM
0 votes
1 answers
48 views
Can DPDK Work With UEFI SecureBoot Enabled - Kernel Lockdown Mode?
Apologies in advance if I have incorrect assumptions in the post. I'm still getting the hang of DPDK. Basically, I am trying to utilize DPDK on a Generation 2 Hyper-V VM that has Secure Boot enabled. On boot up of the Ubuntu-based VHD that DPDK runs on, I am seeing this in the dmesg logs: ```none [...
Apologies in advance if I have incorrect assumptions in the post. I'm still getting the hang of DPDK. Basically, I am trying to utilize DPDK on a Generation 2 Hyper-V VM that has Secure Boot enabled. On boot up of the Ubuntu-based VHD that DPDK runs on, I am seeing this in the dmesg logs:
[    0.000000] Kernel is locked down from command line; see man kernel_lockdown.7
Along with:
raw io port access is restricted; see man kernel_lockdown.7
Since DPDK is meant to bypass the kernel stack, my assumption for its poor performance/no traffic over the virtual function is due to this lockdown mode. Company policy requires Secure Boot to be enabled, so if anyone has advice or resources I could read to work towards a solution, that would be great.
ctap18 (1 rep)
Mar 4, 2025, 07:08 AM • Last activity: Mar 7, 2025, 03:02 PM
38 votes
5 answers
84837 views
Optimizing logical sector size for physical sector size 4096 HDD
With many new hard drive disks the physical sector size is 4096. Would it be possible to make the system use a logical sector size of the same size, rather than the default logical sector size of 512? Will it speed up bulk reads and writes? Where can it be configured?
With many new hard drive disks the physical sector size is 4096. Would it be possible to make the system use a logical sector size of the same size, rather than the default logical sector size of 512? Will it speed up bulk reads and writes? Where can it be configured?
matanox (622 rep)
Jan 13, 2015, 01:14 PM • Last activity: Jan 22, 2025, 06:32 PM
Showing page 1 of 20 total questions