CPU utilization periodically drops to 0%

Asked 2 years ago, Updated 2 years ago, 51 views

I'm having trouble with the timing of the site's very poor response.
The frequency is several times per minute.

It's only been three days since it was released, so there's very little access.

The top command shows that the CPU % is 0.0 for all processes at that time.
load avarage has not changed and I don't know what to check.

I wonder if the performance is insufficient...

I am confused because I have touched aws for the first time.
Could you please let me know if there is anything I need to check?

Thank you for your cooperation.

Environment

  • ec2t2.micro
  • rails+unicorn+nginx+mysql(RDS)
#top
top-00:17:50 up 28 days, 3:43, 1 user, load average: 0.00, 0.01, 0.05
Tasks: 78 total, 1 running, 77 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si, 0.0% st
Mem: 1020188k total, 957248k used, 62940k free, 28436k buffers
Swap: 0k total, 0k used, 0k free, 151028k cached

# free
             total used free shared buffers cached
Mem: 1020188 957000 63188 80 28468 151080
-/+ buffers/cache: 777452 242736
Swap: 0 0 0 0 0 0 0 0 0 0 0 00

# df 
Filesystem1K-blocks Used Available Use % Mounted on
/dev/xvda18123812 2541908 5481656 32%/
devtmpfs500896 565008401%/dev
tmpfs5100920 5100920%/dev/shm

ruby-on-rails ruby mysql aws

2022-09-30 11:46

1 Answers

I'm worried about the access log when the site is heavy.
Is the response time output in the access log?
Nginx can be retrieved with log_format $request_time.Note: http://nginx.org/en/docs/http/ngx_http_log_module.html

I am also concerned about $upstream_response_time because it is handled by unicorn/rails.If you haven't, try it.

A shorter response time means that it is not a server problem.
If the response is taking a long time, what percentage of $upstream_response_time is likely to change the cause.


2022-09-30 11:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.