Why the 'uptime' command showing the load output faster than the 'w' command. I am unable to use the 'w' command in high load environment but the 'uptime' shows the results more faster..
uptimedoes less work, and is my default way to see load average. At very high load levels,
w looping over the users is significant.
Notice the uptime line is probably identical. Both are from the procps package and using the same implementation. The source code is straightforward if you want to learn what exactly these do, these are simple utilities.
Performance tools sometimes don't scale well at the extremes. Running
top is a noticeable impact on a system with 20,000 processes.