> Hello, > > I had a question to ask the community. I have written > as server and a client using TCP. We have around > thousands of clients contacting the server. For each > client connection I am opening a new thread to > process the request. When the client is done, the > threads close and also the socket get freed up. > > The question is , I am doing a "shutdown(sock) and > then close(sock). But still I am seeing that with > every client connection and closing the memory > consumption of the server is increasing. I am using > plain simple pmap -x pid to see the memory usage. > Is there any way to check(Dtrace or MDB) that the > socket buffer being freed ? Also does close free up > the socket buffer itself ? > During the socket open can I give any option to free > the buffer immediately ?
I don't see what pmap should have to do with socket buffers. Socket buffers would live in the kernel, I think, not in user space (which is what pmap shows). If pmap shows space growing, I'd think it's either in your code or in a library. You don't say what version of [Open]Solaris you're using, which may make it harder to point you to any known bug... -- This message posted from opensolaris.org