Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Memory Usage Question

Reply
Thread Tools

Memory Usage Question

 
 
gwoodhouse@gmail.com
Guest
Posts: n/a
 
      10-13-2010
Hi Guys,

Do any of you know if the size of a file matters when keeping a file
handle open within Tomcat?

out logging software is writing to files that are 4gb+ and its getting
out of memory exceptions. It could be unrelated i was just wondering
if the size of the file being written to effects the memory allocation
within the jvm?

Thanks

Graeme
 
Reply With Quote
 
 
 
 
markspace
Guest
Posts: n/a
 
      10-13-2010
On 10/13/2010 8:08 AM, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Do any of you know if the size of a file matters when keeping a file
> handle open within Tomcat?
>
> out logging software is writing to files that are 4gb+ and its getting
> out of memory exceptions.



I don't think it should matter, not the way you are thinking. However
in general a 4 gigabyte file is an unwieldy thing, I think you should be
rotating your logs more often.

Try saving and replacing the large log file so that you start fresh with
a new one, see if the problems go away. I bet they don't.

Unless you have something in the code base that tries to read in the
whole file (do you do regex searches of your own logs from within
Tomcat?).....
 
Reply With Quote
 
 
 
 
gwoodhouse@gmail.com
Guest
Posts: n/a
 
      10-13-2010
On Oct 13, 5:18*pm, markspace <(E-Mail Removed)> wrote:
> On 10/13/2010 8:08 AM, (E-Mail Removed) wrote:
>
> > Do any of you know if the size of a file matters when keeping a file
> > handle open within Tomcat?

>
> > out logging software is writing to files that are 4gb+ and its getting
> > out of memory exceptions.

>
> I don't think it should matter, not the way you are thinking. *However
> in general a 4 gigabyte file is an unwieldy thing, I think you should be
> rotating your logs more often.
>
> Try saving and replacing the large log file so that you start fresh with
> a new one, see if the problems go away. *I bet they don't.
>
> Unless you have something in the code base that tries to read in the
> whole file (do you do regex searches of your own logs from within
> Tomcat?).....


Yeah i know the log files are stupidly large.

Unluckily its "On someone else's to do list". Meaning i don't get to
go in and fix it even though its a 2 minute job. Oh well.

As for regexing the file... no i don't think so... or i would hope
not.......
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      10-14-2010
On Wed, 13 Oct 2010 08:08:41 -0700 (PDT), "(E-Mail Removed)"
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone who
said :

>Do any of you know if the size of a file matters when keeping a file
>handle open within Tomcat?


For FAT it has to keep the fat entries resident. For NTFS it has to
keep the extent table resident. In general if the file is defragged
it will take less RAM to read it since the extent table will be
shorter. However, those tables live in the OS space, not Java space.
See http://mindprod.com/jgloss/profiler.html for a tool to find out
what is eating up your Java RAM.

--
Roedy Green Canadian Mind Products
http://mindprod.com

Microsoft has a new version out, Windows XP, which according to everybody is the "most reliable Windows ever." To me, this is like saying that asparagus is "the most articulate vegetable ever."
~ Dave Barry
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory usage per top 10x usage per heapy MrsEntity Python 20 09-27-2012 08:00 AM
What is the difference between Memory Usage and Heap Usage in my JVMMetrics ? Krist Java 8 02-10-2010 12:44 AM
retrieving CPU Usage and Memory Usage information in JAVA hvt Java 0 03-13-2007 01:09 PM
retrieving CPU Usage and Memory Usage information in JAVA hvt Java 0 03-13-2007 01:07 PM
Need help on memory usage VS PF usage metfan Java 2 10-21-2003 01:58 PM



Advertisments