Open jaime0815 opened 2 years ago
I did not find any hint using pprof tool
you're creating a lot of clients, and getting oom before attempting to close them, so this implies the go client is using a lot of memory, not that the memory isn't garbage collected.
you could try the experiment using more than one machine to instantiate the admin clients.
fwiw, in my own testing i've seen little impact on performance on number of open connections per broker up to about ~7000 connections. with that said, establishing SSL connections is expensive, so you'll probably get timeouts if you try to establish them all at once. the most important thing when optimizing performance is to make sure you're batching messages - in my experimentation, i saw performance roughly proportional to number of broker requests.
And to add to what @mhowlett says; try reusing existing clients (producers, adminClients) as far as possible.
And to add to what @mhowlett says; try reusing existing clients (producers, adminClients) as far as possible.
@edenhill Try reusing existing clients can resolve this issue, but should not get oom when creating a lot of producer object, they should be shared the connection and some initialize data?
no, each client instance is expensive (but powerful), you should generally try to minimize the number of client instances you create.
Description
I want to find a max connection number of confluent Kafka by creating a lot of AdminClient connections, but it will happen oom kill when the number of the connection reaches 3000 around, it seems space doesn't free that allocated with C.
the following is the system message log
How to reproduce
Checklist
Please provide the following information:
ConfigMap{...}
"debug": ".."
as necessary)