Go GC列印出來的這些資訊都是什麼含義?

astaxie發表於2016-11-02
gc 87 @2.361s 9%: 0.032+2.6+0.13 ms clock, 0.26+2.7/4.9/4.2+1.1 ms cpu, 19->19->9 MB, 20 MB goal, 8 P
gc 88 @2.375s 9%: 0.006+2.1+0.18 ms clock, 0.051+0.048/3.8/9.0+1.4 ms cpu, 18->18->9 MB, 19 MB goal, 8 P
gc 89 @2.402s 9%: 0.005+1.7+0.11 ms clock, 0.047+0.032/3.1/8.7+0.95 ms cpu, 18->18->10 MB, 19 MB goal, 8 P
gc 90 @2.412s 9%: 0.004+1.7+0.080 ms clock, 0.039+0/3.4/10+0.64 ms cpu, 19->19->9 MB, 20 MB goal, 8 P
gc 91 @2.457s 9%: 0.006+2.4+0.14 ms clock, 0.049+0.53/3.7/0+1.1 ms cpu, 18->18->6 MB, 19 MB goal, 8 P
gc 92 @10.996s 2%: 0.011+2.1+0.33 ms clock, 0.088+0/3.7/10+2.6 ms cpu, 11->12->6 MB, 12 MB goal, 8 P
gc 93 @68.771s 0%: 0.012+1.9+0.089 ms clock, 0.098+0.010/3.2/8.5+0.71 ms cpu, 12->12->6 MB, 13 MB goal, 8 P

當我們除錯 GC 開啟 GODEBUG=gctrace=1 開啟的時候就會輸出如上所示的這些資訊,這些都是對應什麼意思啊?

更多原創文章乾貨分享,請關注公眾號
  • Go GC列印出來的這些資訊都是什麼含義?
  • 加微信實戰群請加微信(註明:實戰群):gocnio

相關文章