Kybo_Ren wrote:
But here's the kicker:
If I minimize Azureus and wait for a bit, usage drops down to 10MB.
Does Azureus really need 30MB to draw one page? Sheesh. Must be a lot of stuff then.
It's not using 30MB to draw one page. Say you're downloading 5 files and uploading 10 - each of these files will have several buffers in memory. When a downloading file's buffer reaches the size of a disk block, it will be written to disk (and if you're downloading parts of the file from 5 people, there are probably 5 buffers for that one file). When an uploading file's buffer has been completely sent, it will be replaced by another buffer from the disk (but if there are multiple people downloading this one file it may have many of these buffers in memory). This is what is causing the memory to climb. If you leave the app minimized, the memory usage still climbs, right?
The GUI is worth about 2MB on my system. If I let the memory climb to say 30 megs and then minize, it immediately falls down to 6 megs. If I let the memory climb to 10 megs and then restore the app, it will quickly jump up about 2 megs to 12megs. If I do this several times in a row, this effect is largely minized though and the app stays close to 30 megs. The question of why the memory drops to 6 megs when the app is minized is puzzling. In general, I think that Colby's statement is correct. If you open and close or tab into windows with different gui components, there should be some overhead, and it will take a little while for the gc to run and collect them. This alone probably doesn't account for the somewhat strange behavior and large memory drops in this app though.
If I let it sit minimized long enough, it will eventually climb to over 100 megs on my system. If I restore then minimize, it falls back down to about 6 megs. If I let it climb indefintely, it will peak at about 130 megs on my system and then drop to about 30 megs, which is also very puzzling (the 6meg vs 30meg difference). Although I haven't profiled Azureus, I believe the aforementioned file buffers are not being flushed and reclaimed. They just sit in memory until the gc runs.
There is also the issue(s) of the OS caching the hard disk. Whatever the reason(s), Azureus uses a fair amount of memory - however, if you're system does get low on memory, the gc runs and the memory usage does fall substantially. It is probably just a tradeoff between hitting the disk multiple times and available memory. The nice thing about ram is that it can be reused pretty much indefinitely.
