wundergraph / graphql-go-tools

GraphQL Router / API Gateway framework written in Golang, focussing on correctness, extensibility, and high-performance. Supports Federation v1 & v2, Subscriptions & more.
https://graphql-api-gateway.com
MIT License
704 stars 132 forks source link

Higher CPU-usage after epoll implementation #940

Closed argoyle closed 3 weeks ago

argoyle commented 4 weeks ago

The new epoll implementation introduced in rc110 increased the CPU-usage quite drastically (my horizontal pod autoscaler was running on max replicas). Reverting back to rc109 puts it back to normal again. Feels like a busy-loop somewhere.

jensneuse commented 4 weeks ago

Please try 111

argoyle commented 4 weeks ago

kubectl top pod output rc109:

image

rc111:

image
jensneuse commented 4 weeks ago

Can you explain the screenshots? I don't know much about kubectl output, sorry.

argoyle commented 4 weeks ago

Sorry. 😁 The column with increased numbers is the CPU usage. As you can see there is a 15-20 times increase in CPU at rest. And my autoscaler has decided to scale up to 4 replicas instead of my regular 2.

jensneuse commented 4 weeks ago

Please try 112

argoyle commented 4 weeks ago

Better but still a bit higher, about 10 times 109 now:

image
jensneuse commented 4 weeks ago

Numbers look like 109 or am I misinterpreting it?

argoyle commented 4 weeks ago

109 is on 1m, 111 on 25-30m and 112 on 10-15m so still some way off I would say.

jensneuse commented 4 weeks ago

Oh, I was looking at Mi, is that Mibibytes memory usage? I have an idea how we can make it 1.

argoyle commented 4 weeks ago

Correct, that's mem-usage. That's been quite constant.

jensneuse commented 3 weeks ago

Please test 113 and let me know if it looks fine.

argoyle commented 3 weeks ago

That did the trick. Back down to 1 now. Thanks for quick resolution. ❤️