Re: [xSocket-develop] Question about optimization
Status: Inactive
Brought to you by:
grro
|
From: M. B. <mic...@el...> - 2010-06-08 11:38:45
|
Hi Brad,
I am running client and server (in Java and xsocket). Client is sending 500
times/second to the server, and the server forwards message to as the
database query. I think that the server cannot handle that much information
(too much information!). When, for instance, the clientis turned off, the
server still receives information for some time. Can we influence the buffer
size? What is all about DirectBuffer (that helped before, but still the
memory increases).
Info: J2SE 6, org.xsocket.connection.dispatcher.maxHandles =
3org.xsocket.connection.client.readbuffer.preallocated.minSize =
10org.xsocket.connection.server.readbuffer.preallocated.minSize =
10org.xsocket.connection.client.readbuffer.preallocation.size =
64org.xsocket.connection.server.readbuffer.preallocation.size =
64org.xsocket.connection.client.readbuffer.defaultMaxReadBufferThreshold =
3org.xsocket.connection.server.readbuffer.defaultMaxReadBufferThreshold =
3org.xsocket.connection.server.readbuffer.usedirect =
trueorg.xsocket.connection.server.readbuffer.preallocation.size =
64org.xsocket.connection.server.workerpoolSize =
5org.xsocket.connection.server.workerpoolMinSize =
1org.xsocket.connection.server.readbuffer.defaultMaxReadBufferThreshold = 3
(i don't fully understand these parametres)
Thank You for help,
Michal
Dnia 2010-06-07 20:31 Brad McEvoy napisał(a):
>Hi Michal,
>
>I'm interested in finding out more abou this problem. Do you actually
>get out of memory exception errors if this is left to run? What JVM are
>you using and on what OS? Assuming you're using the sun VM, what is your
>maximum and initial memory settings?
>
>Cheers,
>Brad
>
>On Sun, 06 Jun 2010 15:42 +0200, "Michal Bucko"
><mic...@el...> wrote:
>> Hi Gregor,
>>
>> I will now use visual gc and provide more information ASAP. The problem
>> appears even in the simple code where the only thing
>> I do is sending a query to MySQL database. I have tried to trigger GC by
>> using System.GC but it didnt work (the chart was smoother,
>> but still it was going up). As I probably said before, using
>> S_start -
>> System.setProperty("org.xsocket.connection.server.readbuffer.usedirect",
>> "true");C_start -
>> System.setProperty("org.xsocket.connection.client.readbuffer.usedirect",
>> "true");
>> helped me to get 50MB memory consumption (very high) in 60 minutes
>> instead
>> of 250MB in 20minutes without it.
>> Tried with flushing, but that didn't help at all.
>> I will provide more info ASAP but could You, please, give me some hints
>> as
>> how to deal with GC/xsocket issues in general? Maybe
>> this will help - in the same time Im working on visual gc info.
>> Best regards,
>> Michal
>>
>> Dnia 2010-06-05 17:31 Gregor Roth napisał(a):
>> >/>
>> >Hi Michal,
>> >
>> >have you already check the garbage collection behaviour. xSocket should
be
>> free of memory leaks. It will be permanently check for memory leaks. For
>> this reason the garbage collector should free memory after a period or
>> time
>> (by exceeding a threshold). Did you check the memory behaviour of your
>> app
>> with tools such as visual gc?
>> >Gregor
>> >
>> >
>> >
>> >----- Original Message -----
>> >From: Michal Bucko
>> >Sent: 06/05/10 01:39 PM
>> >To: xso...@li...
>> >Subject: Re: [xSocket-develop] Question about optimization
>> >
>> >Hi Gregor, So the question is: how can I write an application in Java
using
>> xsocket library so that the application works as server application, ie.
>> the
>> server doesnt increase in memory consumption. Memory and profiling
>> screenshots: http://wgrajfoto.pl/pokaz/img0610/aaadc52.jpg
>> http://wgrajfoto.pl/pokaz/img0610/pamiec3d05.jpg Thank You for help,
>> Michal
>>
----------------------------------------------------------------------------
>> -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad
>> Father's
>> Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize
>> list and enter to win: http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________ xSocket-develop mailing
>> list
>> xSo...@li...
>> https://lists.sourceforge.net/lists/listinfo/xsocket-develop
>> >
>>
----------------------------------------------------------------------------
--
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit. See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> xSocket-develop mailing list
>> xSo...@li...
>> https://lists.sourceforge.net/lists/listinfo/xsocket-develop
>>
>--
> Brad McEvoy
> br...@br...
>
> |