Windows XP Maximum RAM per program

phaxmohdem

Golden Member
Aug 18, 2004
1,839
0
0
www.avxmedia.com
Hello, I have a question for the masses regarding Windows XP (32bit) and its RAM management. My system has 2GB of RAM installed. When using photoshop, the system will cut the ammount of RAM that Photoshop can use at somewhere in between 800-900MB. The same held true when I tried to run MemTest.

Is there a way to adjust this so that an application can use all the available RAM instead of being cut off at a certain point? It kinda sucks, having Photoshop still scratch the HDD repeatedly when I have nearly 1GB of RAM still free. Thanks.
 

episodic

Lifer
Feb 7, 2004
11,088
2
81
start-control panel - system - advanced tab - performance settings tab - advanced tab (again) -virtual memory (change) - select 'no paging file'

That will force 'everything' into ram.
 

episodic

Lifer
Feb 7, 2004
11,088
2
81
Originally posted by: theAnimal
Leave the page file Windows managed. :)

He has 2 gigs of ram. He wants things to be in RAM only. Here is a great way.

I've got 1.5 gigs of ram. I've had my paged file turned off for over a year.

Never a problem for me at least.
 

KeithP

Diamond Member
Jun 15, 2000
5,664
202
106
In PhotoShop CS and CS2, under the preferences setting, there is an option called "Memory & Image Cache" that regulates how much RAM Photoshop will use. Have you checked that? I believe it defaults to around 50%.

If you are running CS2 you will probably want to enable the Bigger Tiles plug-in as well.

-KeithP
 

theAnimal

Diamond Member
Mar 18, 2003
3,828
23
76
So you have no pagefile.sys in C:\ ?

And BTW how is turning off the page file going to make Photoshop use more RAM?
 

JustAnAverageGuy

Diamond Member
Aug 1, 2003
9,057
0
76
Originally posted by: episodic
start-control panel - system - advanced tab - performance settings tab - advanced tab (again) -virtual memory (change) - select 'no paging file'

That will force 'everything' into ram.

Despite what others may tell you, this is a VERY BAD idea regardless of how much RAM you have.

Programs will use a page file whether you allow it or not.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Every process has access to 4G of VM which 2G of that reserved for the kernel by default, that gives each process 2G of usable VM. There's no way you can change that (not totally true, but not really relevant here).

Disabling the pagefile won't change the way XP allocates memory, all it will do is force crap to stay in memory that you probably don't want. The majority of paging comes from things that aren't in the pagefile like executables, shared libraries, mmap'd files, etc. The only data that goes in the pagefile is data that has no other place on disk to go and in most cases there's very little of that. In your case with Photoshop there's probably more modified private data than on a normal desktop, but I doubt that matters since you're saying it never even gets to use 50% of your physical memory.
 

itachi

Senior member
Aug 17, 2004
390
0
0
Originally posted by: JustAnAverageGuy
Despite what others may tell you, this is a VERY BAD idea regardless of how much RAM you have.

Programs will use a page file whether you allow it or not.
THANK YOU!

but it's not necessarily the programs that'll use the page file.. the memory manager handles that.

the windows memory manager uses a virtual memory hierarchy with demand-based paging. contrary to popular belief, disabling the page file won't improve performance by any measurable amount.
when a program starts.. the mm loads only parts of it into memory (and it does this based on how much memory you have, ram and paging file). for large programs, it reduces load time significantly.

if the program requests a page that's not in the working set, a trap is issued to the processor while the page is found.. known as a page fault. first the memory manager tries to find the page in ram (soft page fault), if it cant find it it searches in the page file (hard page fault), and if it can't find it there either (invalid page fault), then the process has to be killed.. if the calling process detects the error, it can handle it then continue execution.. if it doesn't, then windows shuts down the program entirely.

alternately, you can also really hurt performance by setting the size of the paging file too high.. if you make it too large the system will see an amount of memory that's significantly higher than the physical amount. as a result more of the program is loaded on startup and the thread associated with paging will have to swap out more pages to disk.