|
From: Leif M. <le...@ta...> - 2004-07-01 17:11:39
|
Rick,
I sat down tonight and completely rewrote the function which reads
and then logs
console output from the JVM. The new routine now allocates its
internal buffer
dynamically, growing as needed so there should no longer be any limit to
the length
of output lines.
It is still possible that line feeds could be inserted for very very
long lines when the
system is under high load. This is because I only allow the main loop
to stay in that
function for a certain period of time before breaking out to handle more
critical
functions. This should be rare however.
The great news is that comparing speed tests of the old version with
the new,
I found that this rewrite has given the Wrapper a 4x speed increase when
processing
large amounts of JVM output. The Windows version had always been slower
than the UNIX version. But they are now about the same speed.
The UNIX version had already been making use of a dynamic buffer so
it was
handling long lines correctly.
I want to do more load testing of this, but it will be in the 3.1.1
release.
Cheers,
Leif
Rick Szeto wrote:
> Leif,
> Some of our messages are pretty large(ie Base64 encoding of images,
> don't ask... :-[ ).
> I think it is quite reasonable for there to be a fixed limit. I would
> propose 2048 or 4096
> characters even. I would hazard to guess that performance would not
> degrade too badly
> given a larger fixed buffer.
>
> What do you think?
>
> Rick
>
> Leif Mortenson wrote:
>
>> Rick,
>> Currently for performance reasons, a fixed buffer is used when
>> reading the JVM
>> output. The way it is implemented, this causes a linefeed each 1024
>> characters
>> for very long lines. There is not a way to change this behavior in
>> the current release.
>> I will look into getting that cleaned up. It has been a minor
>> annoyance in a couple
>> of my applications as well.
>> At some point, I want to make the buffer dynamically scale. But I
>> am trying to
>> get a release out. If it is within reason, I can quickly up the size
>> a bit. How long are
>> the lines you are trying to log?
>>
>> Glad to hear we are helping with mental health in our own little
>> way. :-)
>>
>> Cheers,
>> Leif
>>
>> Rick Szeto wrote:
>>
>>> Hi all,
>>> I am experiencing long logs entries to the console logfile being
>>> truncated. Is there a configuration parameter I missing that will
>>> fix this? Or is this a know problem?
>>>
>>> Any help would be greatly appricated.
>>>
>>> BTW, the wrapper is the only thing that is keeping me sane in our
>>> production environment.
>>> Thanks.
>>>
>>> Rick Szeto
>>
|