4GB memory for Windows 2000 Pro / XP pro

kleinwl

Senior member
May 3, 2005
260
0
0
I work in a Fortune 50 will Dell workstations. One of my coworkers uses a dual xeon, 4GB (memory) machine to run CFD/FEA. Unfortunitly, he is on windows 2000 pro, and it is not fully utilizing his available memory. Since the programs are single threaded the 2nd xeon idles and 2GB of the memory is unused. Is there anyway to force the single program to use the full 4GB of memory (paging out more if possible) and perhaps utilize the second cpu (though that isn't so critical)?

Thanks!
 

JonnyBlaze

Diamond Member
May 24, 2001
3,114
1
0
modify your boot.ini file. it will look similar to this:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect

make it look like this, added /3GB

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /3GB


do this at your own risk but it will let programs use more ram. serarch the web for windows 2000 /3gb switch for more info
 

ProviaFan

Lifer
Mar 17, 2001
14,993
1
0
Jonny's advice is good. I will add, however, that there is no way to make a single-threaded application use two CPUs. The only way to ensure maximum utilization of both your CPUs and RAM is to run two separate applications at the same time, though depending on the nature of the work, this may not be practical or possible.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: kleinwl
I work in a Fortune 50 will Dell workstations. One of my coworkers uses a dual xeon, 4GB (memory) machine to run CFD/FEA. Unfortunitly, he is on windows 2000 pro, and it is not fully utilizing his available memory. Since the programs are single threaded the 2nd xeon idles and 2GB of the memory is unused. Is there anyway to force the single program to use the full 4GB of memory (paging out more if possible) and perhaps utilize the second cpu (though that isn't so critical)? Thanks!

Ok, first 4 GB's of memory is not available to the application in the 32 Windows world. The address space is split, by default, into 2 gigs for your application and 2 gigs for the kernel. This is true for every process running. JohnnyBlaze mentioned the /3GB switch which changes the split from 2/2 to 3/1 (user/kernel). However, your app must be tagged as being 3GB aware (of you must tag it yourself with the imageedit tool) or you will still get the 2/2 split. So, as posted, the solution suggested won't help.

Second, on XP 64, if your app is 3GB aware (bulit that way or tagged that way) you actually get a 4/0 split (user/kernel) since they can map the kernel address space outside of the 4gig address space of your application.

Bill

 

kleinwl

Senior member
May 3, 2005
260
0
0
Thank you guys... I'm going to try out the /3gb switch... I'll let you know how it goes.

Unforunitly, the only way to run 2 processes is to buy a second license... which is about $10K - $15K (depends on program) per year.
 

imported_BikeDude

Senior member
May 12, 2004
357
1
0
There are good reasons why /3GB isn't the default. By reducing the amount of virtual address space available to the kernel, you may be compromising performance more than it is worth.

Read http://blogs.msdn.com/oldnewthing/archive/2004/08/06/209840.aspx and search for other /3GB articles there to get the full picture.

Also check task manager and make sure the OS can actually see the total amount of physical memory that you think is available. The BIOS need to perform some tricks in order to move memory out of the way from PCI devices. (I lost 768MB memory until I figured out the correct memory hole setting on my motherboard)

And even though your process is limited to 2GB, keep in mind that the cache manager will happily utilise the rest, so it isn't all a total loss!
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: bsobel
Originally posted by: kleinwl
I work in a Fortune 50 will Dell workstations. One of my coworkers uses a dual xeon, 4GB (memory) machine to run CFD/FEA. Unfortunitly, he is on windows 2000 pro, and it is not fully utilizing his available memory. Since the programs are single threaded the 2nd xeon idles and 2GB of the memory is unused. Is there anyway to force the single program to use the full 4GB of memory (paging out more if possible) and perhaps utilize the second cpu (though that isn't so critical)? Thanks!

Ok, first 4 GB's of memory is not available to the application in the 32 Windows world. The address space is split, by default, into 2 gigs for your application and 2 gigs for the kernel. This is true for every process running. JohnnyBlaze mentioned the /3GB switch which changes the split from 2/2 to 3/1 (user/kernel). However, your app must be tagged as being 3GB aware (of you must tag it yourself with the imageedit tool) or you will still get the 2/2 split. So, as posted, the solution suggested won't help.

Second, on XP 64, if your app is 3GB aware (bulit that way or tagged that way) you actually get a 4/0 split (user/kernel) since they can map the kernel address space outside of the 4gig address space of your application.

Bill

Bill is absolutely correct here. The /3GB switch will not help you if the application is not /3GB aware. Since the app is single threaded I seriously doubt it's sophisticated enough to be /3GB aware. Also the /3GB switch applies to VIRTUAL memory. It has nothing to do with the amount of physical memory in the box. I think all you'll end up accomplishing is running your system on less kernel mode address space.

The answer to your question is no, you can't do it. That app can use it's 2GB of address space (which again doesn't mean 2GB of physical memory) and that's it. It's also single threaded so one CPU at most. You'll need to modify the application if you want to change this.
 

kleinwl

Senior member
May 3, 2005
260
0
0
Well... I tried it on the win 2000 pro system and it hangs at boot.
I went into the task manager and run explorer, but the application would not initialize... same when I tried to run c:/boot.ini to eliminate the /3GB switch.
(error on 0xc00000142)

So... it seems like the boot.ini corrupted. I'm going to try to boot from the cds.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Since the app is single threaded I seriously doubt it's sophisticated enough to be /3GB aware

Perhaps I'm missing something obvious, but I can't imagine what special precautions would need to be taken to make an app "3G aware". All /3G switch does is expand the range of virtual addreses that can be assigned to a userland process. The addresses will still be within the 32-bit integer range so nothing will overflow if it gets a high address. The only problem I can see is if the app checks it's pointers to see if they fall within the 0-2G range and if that's true, the app is fundamentally broken anyway.

Also the /3GB switch applies to VIRTUAL memory. It has nothing to do with the amount of physical memory in the box. I think all you'll end up accomplishing is running your system on less kernel mode address space.

True, but you need virtual addresses to get to physical memory. Apps can use a hack like AWE to get access to more than 2G physical memory, but it incurrs a bit of overhead as the address window has to be adjusted as physical memory outside of the window is needed.

And as for limiting the amount of VM available to the kernel, does anyone know how much that would really hurt? I don't have a Windows box handy to even see if I can get it to tell me how much kernel-space VM is in use. I know that Linux by default uses a 3/1 split without issues and there have been patches to take the split down to .5/3.5 although that causes a noticable performance hit from what I hear. And while it's possible I can't imagine that NT would need double the VM space to run well. But I guess with all of those 3rd party drivers, it's hard to make any assumptions about Windows.
 

imported_BikeDude

Senior member
May 12, 2004
357
1
0
Originally posted by: Nothinman
The addresses will still be within the 32-bit integer range so nothing will overflow if it gets a high address. The only problem I can see is if the app checks it's pointers to see if they fall within the 0-2G range and if that's true, the app is fundamentally broken anyway.

The issue is that many C programmers treat pointers as signed integers. Hence each application must be carefully reviewed before flagging it as LARGEADDRESSAWARE (just a simple flag in the PE header). You could do this yourself, but it's better to ask the vendor to do his homework instead of having strange crashes and possible data corruption to battle with.

But yeah, you are essentially correct. This has nothing to do with how many threads the process spawns, but rather simply whether it is broken or not. :)
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
when making changes to boot.ini, make a second entry, so that way when you screw the pooch you can boot back to the normal entry and try again.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The issue is that many C programmers treat pointers as signed integers. Hence each application must be carefully reviewed before flagging it as LARGEADDRESSAWARE (just a simple flag in the PE header). You could do this yourself, but it's better to ask the vendor to do his homework instead of having strange crashes and possible data corruption to battle with.

I guess I'm just spoiled by using open source software.
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
Originally posted by: Nothinman
The issue is that many C programmers treat pointers as signed integers. Hence each application must be carefully reviewed before flagging it as LARGEADDRESSAWARE (just a simple flag in the PE header). You could do this yourself, but it's better to ask the vendor to do his homework instead of having strange crashes and possible data corruption to battle with.

I guess I'm just spoiled by using open source software.
Yes but you're not the average user. Even a fair amount of those who use open source software dont know how to fix the code and recompile a poorly written application. ;)

The issue (as we see all too often) is lazy developers.
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: Nothinman
Since the app is single threaded I seriously doubt it's sophisticated enough to be /3GB aware

Perhaps I'm missing something obvious, but I can't imagine what special precautions would need to be taken to make an app "3G aware". All /3G switch does is expand the range of virtual addreses that can be assigned to a userland process. The addresses will still be within the 32-bit integer range so nothing will overflow if it gets a high address. The only problem I can see is if the app checks it's pointers to see if they fall within the 0-2G range and if that's true, the app is fundamentally broken anyway.
There's not a lot of steps required to make something multithreaded either. A single threaded app doesn't strike me as very sophisticated.
Also the /3GB switch applies to VIRTUAL memory. It has nothing to do with the amount of physical memory in the box. I think all you'll end up accomplishing is running your system on less kernel mode address space.

True, but you need virtual addresses to get to physical memory. Apps can use a hack like AWE to get access to more than 2G physical memory, but it incurrs a bit of overhead as the address window has to be adjusted as physical memory outside of the window is needed.

And as for limiting the amount of VM available to the kernel, does anyone know how much that would really hurt? I don't have a Windows box handy to even see if I can get it to tell me how much kernel-space VM is in use. I know that Linux by default uses a 3/1 split without issues and there have been patches to take the split down to .5/3.5 although that causes a noticable performance hit from what I hear. And while it's possible I can't imagine that NT would need double the VM space to run well. But I guess with all of those 3rd party drivers, it's hard to make any assumptions about Windows.

Yes, drivers are an issue. System cache too. The biggest issue is depletion of PTEs. Using /3GB depletes the available PTEs and if you combine this with other settings that do the same (/PAE, terminal services) you can crash the box. He obviously won't be using PAE here but using /3GB is just as useless in this case. Why fool with it?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Yes but you're not the average user. Even a fair amount of those who use open source software dont know how to fix the code and recompile a poorly written application.

The issue (as we see all too often) is lazy developers.

But most likely someone else out there does know how and with large memory machines being as popular as they are today, stupid errors like that aren't going to last very long.

There's not a lot of steps required to make something multithreaded either. A single threaded app doesn't strike me as very sophisticated.

There's a lot more work requires than simply not using an signed int to store pointer addresses. If your app does anything useful with those threads you'll have to do a lot of locking and synchronization.

He obviously won't be using PAE here but using /3GB is just as useless in this case. Why fool with it?

Because using /3GB might not be useless in this case, it could potentially get him an extra G of memory for his app.
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: Nothinman

He obviously won't be using PAE here but using /3GB is just as useless in this case. Why fool with it?

Because using /3GB might not be useless in this case, it could potentially get him an extra G of memory for his app.

If the app is unaware of /3GB it won't get him squat. No point in enabling it.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If the app is unaware of /3GB it won't get him squat. No point in enabling it.

You can enable the "3G aware" bit on any executable with a reskit tool, if the app isn't stupid it'll just start using more memory.