aspose file tools*
The moose likes General Computing and the fly likes Windows Memory Management Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Windows Memory Management" Watch "Windows Memory Management" New topic
Author

Windows Memory Management

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

At work I have a pretty good machine. 2.0 GHz with 1G of ram. Unfortunately, it has Windoze installed on it. The nightmare of a project I am working on has a build file that will run out of memory unless I set -Xmx1024m. Needless to say, during the build, my machine can't really do anything else. Well, it can, but it's just now performing well. That I can live with. What bothers me the most is that for a long time after the build has completed it seems like Windoze is not recovering the memory allocated for the vm very well. When it finally does, the machine is fine.

I have never had a problem like that in Linux. So I assume it has to be something with Windoze memory management capabilities. Does anyone have any recommendations for tweaks that I can do to get Windoze to recover memory quicker, besides installing Linux.

Am I even correct in my thinking that this is the problem?


GenRocket - Experts at Building Test Data
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Sounds like maybe your page file is too small?


[Jess in Action][AskingGoodQuestions]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Ernest Friedman-Hill:
Sounds like maybe your page file is too small?


How would I go about making it bigger?
Lewin Chan
Ranch Hand

Joined: Oct 10, 2001
Posts: 214
Fixed pagefile size might be an option. (i.e. force the pagefile size to be in the range 2Gb to 2Gb rather than letting Windows manage it for you).

ControlPanel->System->Advanced->PerforamceSettings (VirtualMemomry)

Is the build pure java (i.e. no JNI builds going on, or usage of windows dlls). If that's the case then you could try closing the command prompt immediately after success.

There are a few programs that can force the reclamation of memory from windows, whether they'll actually help you in this instance I don't know. You could try www.outertech.com and their cacheman product (not cachemanXP) which can do this.
[ October 03, 2006: Message edited by: Lewin Chan ]

I have no java certifications. This makes me a bad programmer. Ignore my post.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Check your harddrive space/fragmentation.

You might have a highly fragmented drive, and the page file is making those drive spindles jump around all over the place.

-Cameron McKenzie
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I changed the paging and played around with it a bit. I even tried putting it on my secondary harddrive. Everything got painfully slower. So I have switched back. Defragging didn't help either.
 
Consider Paul's rocket mass heater.
 
subject: Windows Memory Management