Linux – Commands taking very long time to execute on ssh

linuxperformance

Strangely on few on my linux servers, intermittently, when i try to login through ssh and run commands, they take about 15-30 secs to execute every command. Every commands is executed very slow.
But as soon as the command executes, then it performs normal funtion, (i mean does not slows down).

I have checked, CPU, RAM, IO, Network, everything is in normal condition. so what could be the issue?

Best Answer

Check swap memory(free -h) utilization.

If some processes consume high amounts of swap memory this may cause slowness of the system which in turn takes more time to execute commands.