You are not logged in.

#1 2021-02-16 08:27:04

workingwitharch
Member
Registered: 2021-02-15
Posts: 18

[SOLVED] TTY bog-slow , upto a minute of lag in output

I got done installing Arch yesterday. Throughout configuring it , I've been noticing that it has terrible delays in the tty , right from first boot (so this has nothing to do with anything I might have installed) . I'm not going to install and a WM or DE so, this is quite painful.

I tried reading the wiki and searching the forum and came across this : https://bbs.archlinux.org/viewtopic.php?id=242433 . I'm not having the exact same problems , his issue is slow output, my issue is a lag beofre the output is rapidly printed : after entering a command / quitting vim / pressing enter after giving password during login , The cursor  " _ " just sits and blinks on the new line with no output for a very noticeable amount of time, when it ought to be instantaneous. But, his fix was setting

vga=off

and GRUB2 has deprecated that it fixes nothing now.

Am using Intel HD Graphics 4000 and 6000 , and on both machines, the problem persists.

What can be done ?

EDITS:

To visualise the issue , this is similar to how when you run dd / cp / mv / gcc on a large file and press [ENTER], so the cursor moves to the start of the next line in the tty and blinks for a while until the program exits and then the shell prompt is displayed, like :

xyz@xyz ~#

I have the same issue at random when doing simple commands or sometimes when logging in, exiting vim, etc.

Some strange output lag is occurring between my input/program finishing and the shell displaying it's prompt, as I can confirm by running time and then my command : the time taken for the command is very very little, less than a second, and yet I end up waiting for 30-40 seconds before getting the output and prompt.

The same stuff is instantaneous on the install ISO, my Ubuntu install , and basically everywhere else.

I'm using the linux-lts kernel but that shouldn't matter ?

Last edited by workingwitharch (2021-02-17 10:58:53)

Offline

#2 2021-02-16 09:52:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,593

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

Chances are this is your PS1 or something else in your shell config, so please elaborate on that and try whether the same problem happens when running a shell that ignores all configs (bash and zsh have switches for that)
If that's not it, check dmesg for IO errors.

Offline

#3 2021-02-16 10:04:01

workingwitharch
Member
Registered: 2021-02-15
Posts: 18

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

seth , how do I "try whether the same problem happens when running a shell that ignores all configs" ? I do have both zsh and bash , so that's not an issue. I didn't change anything in bash from how it was from first boot though, so not sure how that could be it , and didn't change anything in zsh either except the grml-zsh-config but that was how the install ISO ran too !

Also, dmesg output is huge , any idea on what to grep for in it ?

Thanks for replying !

Offline

#4 2021-02-16 10:10:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,593

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

You can just look at the dmesg tail.

bash --norc --noprofile

Offline

#5 2021-02-16 10:19:38

workingwitharch
Member
Registered: 2021-02-15
Posts: 18

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

seth , here's the pastebin to the entire dmesg : https://pastebin.com/GYp7mDqT

Does it convery a tell tale error ?

As regarding

bash --norc --noprofile

, I'm using zsh as default , anything to do the same in zsh ?

Offline

#6 2021-02-16 10:34:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,593

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

There's a dirty fat on sdc2 that you should address, but nothing that would explain the symptoms of this thread.
I already thought that you use zsh, so we'll test as far away from that as possible ;-)

If the vanilla bash doesn't expose this, we'll at least know that the shell is the cause.

Offline

#7 2021-02-16 10:56:52

workingwitharch
Member
Registered: 2021-02-15
Posts: 18

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

Okay, seth, so that command

" bash --norc --noprofile"

went over my head, how do I execute it ?

Also, /dev/sdc2 is my 100 Mib /boot/efi thing, and this dmesg   (from the BIOS-grub which I've also installed) so is the " dirty fat " explained by that ?

Last edited by workingwitharch (2021-02-16 10:57:14)

Offline

#8 2021-02-16 11:07:45

sabroad
Member
Registered: 2015-05-24
Posts: 242

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

workingwitharch wrote:

waiting for 30-40 seconds before getting the output and prompt.

Rule 1: It’s ALWAYS DNS

What's the output of the following commands?

time hostname -s
time getent hosts
cat /etc/hosts
hostnamectl

--
saint_abroad

Offline

#9 2021-02-16 11:12:19

workingwitharch
Member
Registered: 2021-02-15
Posts: 18

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

Reply to seth

Okay bad, I must have been having a stroke, that was a dead-simple command.

So results :

cp tmp tst

real 1m11.480s
user 0m0.000s
sys 0m0.348s

(the tmp file was 256Mib of 0s from /dev/zero)

while

time sleep 1

real 0m1.002s
user 0m0.001s
sys 0m0.001s

The above was similar over 3-4 repeats after opening a bash norc+noprofile shell , indating that File I/O is specifically affected ? After writing to files, the system takes an abnormal amount of time to get back to giving me the necessary output ?

Last edited by workingwitharch (2021-02-16 11:18:51)

Offline

#10 2021-02-16 11:16:26

workingwitharch
Member
Registered: 2021-02-15
Posts: 18

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

Reply to sabroad

Couldn't possibly be DNS , considering I'm having this slowdown without the networking daemons  running (I don't run them automatically)

Nevertheless I ran those commands and they took less than 0.001 seconds

Offline

#11 2021-02-16 13:26:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,593

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

Let's see whether it's the HDD and what we're dealing with

cd /tmp #tmpfs
dd if=/dev/zero of=test1 count=1M # 512MB, make sure you've enough ram
cp test1 test2
sudo fdisk -l
lsblk -f

Offline

#12 2021-02-16 18:07:54

sabroad
Member
Registered: 2015-05-24
Posts: 242

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

You still haven't posted the contents of /etc/hosts

https://bbs.archlinux.org/viewtopic.php … 6#p1326886


--
saint_abroad

Offline

#13 2021-02-17 10:56:57

workingwitharch
Member
Registered: 2021-02-15
Posts: 18

Re: [SOLVED] TTY bog-slow , upto a minute of lag in output

Conclusion - SOLVED

I moved my Arch install to another disk , and it runs just fine now. Even that bad vfat unmounting is gone smile
Commands were slow because they all were randomly accessing files from a very slow disk, nothing else.

My sincere thanks to seth and sabroad for trying to help, and I apologise for coming to an OS forum with what was a HW bottleneck.

Summary of what I did :
Backup Ubuntu disk entirely with dd from macOS
Copied my arch root partition to a new ext4 partition on my Ubuntu disk with dd while logged into Ubuntu
Updated Grub to show arch and fstab to corrected UUIDs rebooted, Arch would kernel panic not finding root partition, so booted into install ISO , arch-chrooted , mounted everything, regenerated init with mkinitcpio
Arch would boot but into read-only, saw fstab, realised mkinitcpio or something screwed the UUID for root part there, corrected it in Ubuntu, rebooted into Arch
And Viola ! everything back to working !

Offline

Board footer

Powered by FluxBB