Sample Header Ad - 728x90

Typing in the Terminal on Ubuntu takes seconds until the typed character appears

4 votes
1 answer
2004 views
The problem: **typing in the terminal on Ubuntu takes seconds until the typed character appears.** I first noticed this after I moved large chunks of data onto another LUKS encrypted HDD which I mounted via /etc/fstab automatically. Typing in the terminal (I'm using the default bash) responded uncannily slowly. First I thought that the problem is the additional HDD, but after I reinstalled Ubuntu on a new SSD, the problem kept coming back, but I did not mount the HDD at all. I don't think it's the hardware, as the other OS does not have any problem (dual boot on the Samsung 990 Pro). **Details:** * Fresh install of Ubuntu 22.04.4 LTS, full disk encryption with LUKS on a Samsung 870 QVO 4TB Sata 6Gb/s * Also reproducible on a Samsung 990 Pro 4TB M.2 vMVE (2 TB partition without encryption) * 4x8GB of RAM @2133 MT/s, at least 15GB free. * CPU: i7-6700K, all 8 cores read(0, "\33", 1) = 1 pselect6(1, , NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in ) read(0, "[", 1) = 1 pselect6(1, , NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in ) read(0, "A", 1) = 1 write(2, "echo $$", 7) = 7 pselect6(1, , NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in ) read(0, "\33", 1) = 1 pselect6(1, , NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in ) read(0, "[", 1) = 1 pselect6(1, , NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in ) read(0, "A", 1) = 1 write(2, "\10\10\10\10\10\10\10cat /proc/sys/fs/inotify/max_user_watches", 48) = 48 What puzzles me is the **first pselect6 call, which runs for over a second**. That's definitely the culprit, but I don't know how to debug the problem from here. Here's another strace where I'm typing only spaces: strace: Process 6673 attached pselect6(1, , NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in ) read(0, " ", 1) = 1 pselect6(1, , NULL, , {tv_sec=0, tv_nsec=0}, NULL) = 0 (Timeout) write(2, " ", 1) = 1 pselect6(1, , NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in ) read(0, " ", 1) = 1 pselect6(1, , NULL, , {tv_sec=0, tv_nsec=0}, NULL) = 0 (Timeout) write(2, " ", 1) = 1 pselect6(1, , NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in ) read(0, " ", 1) = 1 pselect6(1, , NULL, , {tv_sec=0, tv_nsec=0}, NULL) = 0 (Timeout) write(2, " ", 1) = 1 pselect6(1, , NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in ) read(0, " ", 1) = 1 pselect6(1, , NULL, , {tv_sec=0, tv_nsec=0}, NULL) = 0 (Timeout) write(2, " ", 1) = 1 pselect6(1, , NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in ) read(0, " ", 1) = 1 pselect6(1, , NULL, , {tv_sec=0, tv_nsec=0}, NULL) = 0 (Timeout) write(2, " ", 1) = 1 pselect6(1, , NULL, NULL, NULL, {sigmask=[], sigsetsize=8}strace: Process 6673 detached Sometimes pselect6 is really slow with 2.2 seconds, sometimes it's fast.
Asked by VerteXVaaR (141 rep)
Apr 9, 2024, 08:23 AM
Last activity: Apr 19, 2024, 08:18 AM