老师,我用linux的一个1核的 内存1G的服务器,没有出现io瓶颈的问题,通过top命令到是发现了cpu使用率飚到93%,64.5 us, 29.2 sy。这是是trace跟踪的情况:怎么反应不了是io的问题尼?
mmap(NULL, 393220096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
munmap(0x7f2cc8098000, 314576896) = 0
write(2, "--- Logging error ---\n", 22) = 22
stat("/usr/local/lib/python3.7/logging/handlers.py", {st_mode=S_IFREG|0644, st_size=57674, ...}) = 0
write(2, "Traceback (most recent call last"..., 35) = 35
write(2, " File \"/usr/local/lib/python3.7"..., 108) = 108
write(2, " File \"/usr/local/lib/python3.7"..., 122) = 122
write(2, "MemoryError\n", 12) = 12
write(2, "Call stack:\n", 12) = 12
stat("/app.py", {st_mode=S_IFREG|0664, st_size=1289, ...}) = 0
write(2, " File \"/app.py\", line 52, in <m"..., 63) = 63
write(2, " File \"/app.py\", line 43, in wr"..., 65) = 65
mmap(NULL, 314576896, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2cc8098000
mmap(NULL, 393220096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
munmap(0x7f2cc8098000, 314576896) = 0
write(2, "Unable to print the message and "..., 119) = 119
select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)
getpid() = 1
mmap(NULL, 314576896, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2cc8098000
mmap(NULL, 393220096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
munmap(0x7f2cc8098000, 314576896) = 0
write(2, "--- Logging error ---\n", 22) = 22
stat("/usr/local/lib/python3.7/logging/handlers.py", {st_mode=S_IFREG|0644, st_size=57674, ...}) = 0
write(2, "Traceback (most recent call last"..., 35) = 35
write(2, " File \"/usr/local/lib/python3.7"..., 108) = 108
write(2, " File \"/usr/local/lib/python3.7"..., 122) = 122
write(2, "MemoryError\n", 12) = 12
write(2, "Call stack:\n", 12) = 12
展开