0

I logged into my EC2 instance on AWS, pull the latest code and started running npm update and noticed my Ubuntu become very, very sluggish. When I run ps aux I got this:

USER         PID   %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    ubuntu   11573  0.0  0.2  19836  2156 pts/1    Ss   17:15   0:00 -bash
    root     12935  0.0  0.0   4440   556 ?        S     2015   0:00 /bin/sh /var/awslogs/bin/awslogs-agent-launcher.sh
    root     12936  0.5  3.8 383724 38836 ?        RNl   2015 139:04 /var/awslogs/bin/python /var/awslogs/bin/aws logs push --config-file /var/awslogs/etc/awslogs
    root     13356  0.0  0.0      0     0 ?        S<    2015   0:00 [kworker/u31:1]
    root     17413  0.0  0.0      0     0 ?        S    17:40   0:00 [kworker/u30:0]
    ubuntu   21345 46.5 10.6 1028884 108720 pts/1  Rl+  18:03   0:18 npm                                          
    ubuntu   21359  0.0  0.1  17164  1324 pts/0    R+   18:04   0:00 ps aux

All the rest of the entries are %CPU 0. WHere shall I start looking for what might be slowing it down? I didn't make any change apart from pulling the code from git repository.

EDIT: Its t2.micro instance on free tier

spirytus
  • 197
  • 2
  • 4
  • 1
    Is it a `t1`/`t2` instance? If so, `npm update` may well run you out of CPU credits. `top` would be more useful than `ps aux`, particularly the load averages. – ceejayoz Jan 14 '16 at 18:16
  • did you try stopping/starting? We had many instances that would requires a complete power cycle before coming back to life. (do not do a restart or reboot). – zerobane Jan 14 '16 at 18:18
  • @zerobane not yet, I was hoping I would be able to avoid stoppin/starting – spirytus Jan 14 '16 at 18:19
  • @ceejayoz its t2.micro on free tier. – spirytus Jan 14 '16 at 18:21
  • @spirytus `npm update` on a `t2.micro` will be ungodly slow. Always. – ceejayoz Jan 14 '16 at 18:26
  • that was way slower than usual, I mean instead of 1 minute took like 20. Anyway, I stopped and started again and its back to normal. Still would like to know what caused it though. – spirytus Jan 14 '16 at 18:32
  • 1
    @spirytus The t1/t2 line are burstable instances. If you use a lot of CPU for more than 30+ seconds, their performance can be **severely** capped. Like to 10%. – ceejayoz Jan 14 '16 at 19:14

0 Answers0