RE: [Quickfix-developers] out of memory error
Brought to you by:
orenmnero
From: Timothy Y. <Tim...@pa...> - 2004-06-28 18:02:01
|
I have tried adjusting Java memory parameters, but I don't think this is the problem. I have written a very simple pair of Java quickfix applications: a client that sends orders and a server that sends executions. Each application starts sending messages asynchronously at about 20 per second as soon as the session logon has completed. I run the client on a separate Windows XP box and the server on a dual processor box running Redhat Linux Advanced Server. The Linux host has 4GB of memory of which the majority is free. The server app generally stops with 'out of memory' after a short time (typically less than a minute). If I run both client and server on the Linux host, 'out of memory' seems slightly less likely to occur (but still does). It always seems to be the server that has the memory problem. If I run ps -o vsz repeatedly while the server is running, there is no evidence of any significant increase in virtual memory size of the server; the memory usage is mainly dependent on how much is initially allocated to the JVM heap. I have another pair of applications that operate in a similar manner, except that they interchange market data subscription and refresh messages. The main difference here is that repeating groups are being used. In this case the server end crashes very often in random places, sometimes after as few as 5 or 6 messages, usually with a segmentation violation but occasionally with 'out of memory'. The segmentation violations occur in many different places. When I run the server on Windows XP it works fine. Is it possible that I am building quickfix incorrectly on Linux? My problems seem to be too severe to be normal. Tim. -----Original Message----- From: Oren Miller [mailto:or...@qu...] Sent: Tuesday, June 22, 2004 10:01 AM To: Timothy Yates Cc: 'qui...@li...' Subject: Re: [Quickfix-developers] out of memory error It is probably coming from the operating system/JVM. I'm guessing during high periods of traffic, too much memory is being allocated that doesn't have an opportunity to get garbage collected. Try increasing the memory available to the JVM with the -Xmx parameter, (e.g. -Xmx512m). By default heap size for the JVM is generally only 64MB in client mode, and 128MB in server mode. --oren On Jun 22, 2004, at 9:43 AM, Timothy Yates wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ: http://www.quickfixengine.org/quickfix/doc/html/FAQ.html > > I am running a quickfix 1.7.0 on Redhat Linux using the sun 1.4.2_04 > JVM. > > My application frequently exits unexpectedly after printing the string > 'out > of memory'. This typically happens during periods of high message > traffic. > > Does anyone know where this message comes from? The string 'out of > memory' > seems to be present in both quickfix shared object libraries, but I > can't > see it in the source code. > > The strange thing is that the application does not seem to be using > very > much memory. > > Tim Yates > Lead Developer > Patsystems (US) LLC > 141 West Jackson Boulevard > Chicago 60604, USA > Tel +1 (312) 542-1336 > www.patsystems.com > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |