首页 文章

google_metadata进程占用Google Compute Engine实例中的100%CPU

提问于
浏览
1

我正在使用Google Compute Engine实例(f1.micro) . 由于google_metadata进程(Python)正在消耗CPU . (由于此Google Cloud Console建议“考虑切换到机器类型:g1-small(1个vCPU,1.7 GB内存)”) .

有谁知道这个过程是什么,我们如何纠正这种情况?

top - 14:47:46 up 10 min,  1 user,  load average: 1.10, 1.12, 0.70
Tasks:  82 total,   2 running,  80 sleeping,   0 stopped,   0 zombie
%Cpu(s): 83.6 us, 16.4 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:    608416 total,   498272 used,   110144 free,    20868 buffers
KiB Swap:        0 total,        0 used,        0 free.   310984 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND                                    
  744 root      20   0   31416  15452   6188 R 99.9  2.5   8:56.75 google_metadata                            
    1 root      20   0   96548   5784   3832 S  0.0  1.0   0:01.07 systemd                                    
    2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd                                   
    3 root      20   0       0      0      0 S  0.0  0.0   0:00.04 ksoftirqd/0                                
    5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H                               
    7 root      20   0       0      0      0 S  0.0  0.0   0:00.06 rcu_sched                                  
    8 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_bh                                     
    9 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 migration/0                                
   10 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 watchdog/0                                 
   11 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kdevtmpfs                                  
   12 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 netns                                      
   13 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 perf                                       
   14 root      20   0       0      0      0 S  0.0  0.0   0:00.00 khungtaskd                                 
   15 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 writeback                                  
   16 root      39  19       0      0      0 S  0.0  0.0   0:00.00 khugepaged                                 
   17 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 crypto                                     
   18 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kintegrityd                                
   19 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 bioset                                     
   20 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kblockd                                    
   21 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 ata_sff                                    
suztomo@light-composer ~ $ ps -ef |grep google_metadata
root       744     1 90 14:37 ?        00:09:01 /usr/bin/python2.7 /usr/lib/python-exec/python2.7/google_metadata_script_runner --script-type startup

1 回答

  • 0

    事实证明,该流程负责在Google Compute Engine虚拟机的元数据中运行“启动脚本”,这通常会在此类脚本之后停止 . 但是,在我的设置中,启动脚本永远运行以连续运行某些命令,并且意外地导致了高CPU问题 .

    修复不会有这么长时间运行的启动脚本 .

相关问题