Hi,
I am working on a chat application build with golang. I am using 
open-source server tinode (https://github.com/tinode/chat) as base for my 
chat application. Issue is I am facing is the Resident set (as shown by 
top) shows very high memory usage after a load test ends. Also increasing 
channel capacity is resulting in higher end res value.
Some terminology about server. 
Topic:- Group is a topic, If i am coming online a topic is created, when 
two users chat, topic is created. 
I did some tests with different topic queue limits (hub.go:run():case 
join). Check scenario 1(og) and scenario2(modified). A gatling test was ran 
against both these conditions(and everything else same). At the start and 
end of each test(all ws closed), we noted the Resident Set (as given by 
htop)(these values remained stable after 5min also).
     Before    After
A  417M      1.71G
B  419M      2.09G

This indicates that the channels are not being cleaned for a topic which is 
not active. Any inputs would be helpful. 

Scenario1(A)
clientMsg: make(chan *ClientComMessage, 192),
serverMsg: make(chan *ServerComMessage, 64),
reg: make(chan *ClientComMessage, 256),
unreg: make(chan *ClientComMessage, 256),
meta: make(chan *ClientComMessage, 64),

Scenario2(B)
clientMsg: make(chan *ClientComMessage, 4096),
serverMsg: make(chan *ServerComMessage, 4096),
reg: make(chan *ClientComMessage, 4096),
unreg: make(chan *ClientComMessage, 4096),
meta: make(chan *ClientComMessage, 128),
At the start df

-- 
“The information contained in this message is intended for the addressee 
only and may contain classified information. If you are not the addressee, 
please delete this message and notify the sender; you should not copy or 
distribute this message or disclose its contents to anyone. Any views or 
opinions expressed in this message are those of the individual(s) and not 
necessarily of the Docquity. No reliance may be placed on this message 
without written confirmation from an authorised representative of its 
contents.”

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a1cf9cbd-a198-4da6-97ec-79814fc46df9n%40googlegroups.com.

Reply via email to