2017-09-24 99 views
1

我正在使用Google計算引擎實例(f1.micro)。由於google_metadata進程(Python)正在使用CPU。 (因爲此Google雲端控制檯建議「考慮切換到機器類型:g1-small(1 vCPU,1.7 GB內存)」)。谷歌計算引擎實例中消耗100%CPU的google_metadata進程

有誰知道這個過程是什麼,我們該如何解決這個問題?

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          
[email protected] ~ $ 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 

回答

0

原來,這個過程是負責在谷歌Compute Engine的虛擬機,這通常這樣的腳本後停止的元數據運行「啓動腳本」。但是,在我的設置中,啓動腳本永遠運行以持續運行一些命令,並意外地導致了高CPU問題。

補救措施將不會有這樣長時間運行的啓動腳本。