High RAM Usage - Reformat vs More RAM

Got a shopping cart of parts that you want opinions on? Get advice from members on your planned or existing system (or upgrade).

Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee

Post Reply
acaurora
*Lifetime Patron*
Posts: 1464
Joined: Mon Dec 29, 2003 2:51 am
Location: Elk Grove, CA
Contact:

High RAM Usage - Reformat vs More RAM

Post by acaurora » Wed Nov 10, 2004 10:41 am

Just been noticing lately - Azureus, the BitTorrent client I use, uses JavaVM. Because of that, there is a high RAM usage, and my RAM usage normally is in the ~ 3-500s. With Azureus running, it goes to 4-700! Does anyone know of a way so that JavaVM does not use up so much damn memory?

Running programs - usually -
-MBM 5
-NAV2005
-Norton GoBack
-Norton Ghost
-Azureus
-F@H
-mIRC
-Trillian

What do you think would be better / more effective - buying more RAM, or just reformatting (I plan on moving to 2 SATA RAID Raptors) ? Also, if it makes any difference, I've put my swap file on my 2nd 200 GB HDD, and not on the main 7200.7 200 GB that I have.

burcakb
Posts: 1443
Joined: Tue Mar 09, 2004 9:05 am
Location: Turkey

Post by burcakb » Wed Nov 10, 2004 11:54 am

***Warning I may be saying wrong things, somebody correct me***

I believe Java is an interpreted language. Thus, its memory use is substantially more than a similar compiled program.

I also remember rumors that most Java interpreters "leak" memory and that after running for some time your memory use grows larger and larger.

I'm sure the Java code used on professional web servers is not along these lines but most Java programs I've encountered behave similarly.

How about staying away from Java?

acaurora
*Lifetime Patron*
Posts: 1464
Joined: Mon Dec 29, 2003 2:51 am
Location: Elk Grove, CA
Contact:

Post by acaurora » Wed Nov 10, 2004 12:05 pm

Well the thing is, I use Azureus because it scores the fastest speeds. I have ABC, which does not use Java, but also is slower in speeds. Azureus is also a lot more detailed and informative.

Can never get the best of both worlds... *Sigh.

Denorios
Posts: 223
Joined: Sun Jul 25, 2004 3:24 am
Location: Derbyshire, England

Post by Denorios » Wed Nov 10, 2004 12:46 pm

Doesn't BitTorrent hold a fair amount of the data it downloads in RAM? BitTornado has an option to "Flush data to disk every five minutes", which I interpret as meaning that usually it doesn't dump to disk on a regular basis. I've often observed that if you start/restart, or if the download crashes, you lose some of the data, so maybe it reserves a large block of memory for download?

Straker
Posts: 657
Joined: Fri Jul 23, 2004 11:10 pm
Location: AB, Canada
Contact:

Post by Straker » Wed Nov 10, 2004 7:16 pm

well, if it's the client, what's the other stuff have to do with it?

ignoring that, if azureus seemed to be using an unreasonable amount, i'd probably use bt++ or bittornado instead, as well as kill all that norton crap (and any useless services) :)

could also try different VMs too i guess, see if it makes a diff; i have like 4 installed right now for various reasons, heh

hvengel
Posts: 205
Joined: Sat Oct 19, 2002 12:06 am
Location: Concord, Ca

Post by hvengel » Wed Nov 10, 2004 7:54 pm

There is a trade off between how much memory a program uses and how fast it is for some software. As the original poster pointed out he is using this program because it is the fastest. Guess what it also uses more memory. Way back when memory was very costly programmers would spend huge efforts at making programs use less memory with out too much of a hit on performance. Now days memory is cheap so many programs now trade memory for speed. If you want the speed then buy more memory.

As to how memory usage compares between compiled and interpreted code. The interpreter has a fixed size but the P code (in Java this is called byte code) is fairly compact. So if the program is a small one then in interpreted form it will take more memory than a compiled version. On the other hand if the program is large and complex it may take less memory if it is interpreted. Also Java can be compiled but is no longer portable like it would be if it were still byte code (it will only run on one type of machine).

pangit
Patron of SPCR
Posts: 445
Joined: Wed Feb 05, 2003 1:48 pm
Location: Sydney, Australia

Post by pangit » Wed Nov 10, 2004 10:25 pm

Not wanting to turn this thread into a "this BT client is better than that one" type thread, but....

I use BitComet, which is written in C++ so has very low processor/memory overhead. OK it's not as comprehensive as Azureus but it's pretty good. It does everything I need.

And as for speeds, I'm told (although don't have personal experience) that download speed is not dependent on which client you use.

meglamaniac
Posts: 380
Joined: Thu Jul 15, 2004 12:44 pm
Location: UK

Post by meglamaniac » Thu Nov 11, 2004 12:41 am

I use Azureus - the most RAM I've ever seen it chew up is about 50MB. That's when downloading 3 torrents at the same time.
Have you looked in task manager to see which process is eating all your RAM? That level of memory load seems insane to me.

burcakb is correct, java source code is compiled to a series of byte codes. When you run a java app, these codes go through the interpreter and it is effectively "compiled" on the fly, thus allowing it to be platform independant, which is the entire point.
You could run Azureus on Window, Linux, Mac...
Accusations of memory leaks are generally because the Microsoft Java VM was a big pile of steamy brown stuff. Download the official Sun Java VM from their website - they make the language so it ought to be right!

pangit, speeds can depend on how a particular client queues blocks for download and on what ports it uses and so on, so it can make a difference although it shouldn't be a big one.

Post Reply