golang gc 这种情况是否是需要优化内存? - V2EX
helloworld12

golang gc 这种情况是否是需要优化内存?

  •  
  •   helloworld12 Jan 13, 2018 4112 views
    This topic created in 3045 days ago, the information mentioned may be changed or developed.
    Time: Jan 13, 2018 at 11:14am (CST) Duration: 30.11s, Total samples = 12.17s (40.41%) Entering interactive mode (type "help" for commands, "o" for options) (pprof) top Showing nodes accounting for 6170ms, 50.70% of 12170ms total Dropped 281 nodes (cum <= 60.85ms) Showing top 10 nodes out of 170 flat flat% sum% cum cum% 1370ms 11.26% 11.26% 1370ms 11.26% runtime.futex /usr/local/go/src/runtime/sys_linux_amd64.s 1310ms 10.76% 22.02% 2960ms 24.32% runtime.scanobject /usr/local/go/src/runtime/mgcmark.go 880ms 7.23% 29.25% 880ms 7.23% runtime.heapBitsForObject /usr/local/go/src/runtime/mbitmap.go 480ms 3.94% 33.20% 480ms 3.94% runtime.usleep /usr/local/go/src/runtime/sys_linux_amd64.s 420ms 3.45% 36.65% 420ms 3.45% runtime.greyobject /usr/local/go/src/runtime/mgcmark.go 410ms 3.37% 40.02% 420ms 3.45% runtime.mapiternext /usr/local/go/src/runtime/hashmap.go 390ms 3.20% 43.22% 1330ms 10.93% runtime.mapassign_faststr /usr/local/go/src/runtime/hashmap_fast.go 330ms 2.71% 45.93% 660ms 5.42% runtime.makemap /usr/local/go/src/runtime/hashmap.go 300ms 2.47% 48.40% 310ms 2.55% syscall.Syscall /usr/local/go/src/syscall/asm_linux_amd64.s 280ms 2.30% 50.70% 500ms 4.11% runtime.selectgo /usr/local/go/src/runtime/select.go 

    看着 cpu 最高的都是scanobject

    请教下,谢谢

    2 replies    2018-01-13 13:50:14 +08:00
    jameshuazhou
        1
    jameshuazhou  
       Jan 13, 2018
    这问题没头没尾的
    helloworld12
        2
    helloworld12  
    OP
       Jan 13, 2018
    @jameshuazhou 懂得 golang pprof 的看得懂
    About     Help     Advertise     Blog     API     FAQ     Solana     994 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 46ms UTC 23:04 PVG 07:04 LAX 16:04 JFK 19:04
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86