gls icon indicating copy to clipboard operation
gls copied to clipboard

gc stw increase

Open yanghuashuai opened this issue 9 years ago • 4 comments

jtolds/gls cause gc stw increase: sample code

yanghuashuai avatar Mar 04 '17 13:03 yanghuashuai

I use gls in my two online service, and find all of them slower and slower. Finaly I find gls cause gc stw continue increase.

yanghuashuai avatar Mar 04 '17 13:03 yanghuashuai

You really shouldn't use gls. It's a huge hack. You should use https://golang.org/pkg/context/ instead.

If you insist on using this package, there's not a lot we can do to make it better. Are you sure GC pause time increase is really due to gls here? If you remove gls, the GC pause increase no longer happens?

jtolio avatar Mar 04 '17 21:03 jtolio

@jtolds Yes,I am sure it is due to gls. The GC pause increase no longer happens when I remove gls. And the sample code can show the issue.

yanghuashuai avatar Mar 05 '17 03:03 yanghuashuai

I'm new to golang. Is that the fourth field (8% in the sample) which shows STW? I'm running the code sample for 700 seconds now, and the value does not change. It was started with 22% and now it is still 22%. Also memory consumption does not grow. What I'm doing wrong?

budden avatar Feb 18 '19 19:02 budden