Vista Performance Improvement with less than 4GB RAM

Fike

Senior member
Oct 2, 2001
388
0
0
I am getting ready for a new system build. The system will have 3GB of RAM, although I could conceivably go to 4GB in the future. Will Vista offer any performance improvement over 32 Bit windows when using 3GB of RAM. My most common application is Photoshop CS3 with very large files (300-600 MB). To the best of my understanding, theonly benefit of going to 64 bit OS is the ability to address a larger memory space. With less than 4GB, that doesn't seem like an issue.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If your apps are still 32-bit you'll still be stuck in their 2G VM limit.

And the larger address space doesn't just mean more physical memory, a process' address space gets used up by other things too.
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
If you do plan to go to 4GB or higher later, be careful with your motherboard selection. There are very few motherboards out there today that will be able to give you access to all of that RAM.
 

Fike

Senior member
Oct 2, 2001
388
0
0
Originally posted by: Nothinman
If your apps are still 32-bit you'll still be stuck in their 2G VM limit.

And the larger address space doesn't just mean more physical memory, a process' address space gets used up by other things too.



So, I know that Photoshop CS2 and CS3 can operate in 64 bit mode. So that is okay. Your second statement baffles me. What do you mean by "...a process' address space gets use up by other things too."?

And the original question, will a 64 bit app like photoshop work faster with Vista or XP Pro on the same PC that has 3 GB of RAM? ... or is it the same for both OSes?

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
So, I know that Photoshop CS2 and CS3 can operate in 64 bit mode. So that is okay.

Adobe released 64-bit builds of CS2 and CS3?

Your second statement baffles me. What do you mean by "...a process' address space gets use up by other things too."?

VM is a complex subject, if you're really interested in how it all works I'd suggest grabbing a kernel book like Iniside Windows or Understanding the Linux kernel, both have chapters that explain the concept which applies pretty equally to all OSes right now. But suffice it to say that the amount of memory addresses available to a process are in no way related to the amount of physical memory in a machine, x86 (and most other 32-bit CPUs) have 32-bits worth of addresses and current AMD64 hardware have 48-bits worth. In addition to being used for normal memory allocation those addresses are also used for shared libraries, mmap'd files and the executable itself. That's why whenever a 32-bit process runs out of memory on Windows it usually only gets up to around 1.5G to 1.7G worth of memory allocated, the rest of that 2G is in use by other things.
 

legacyNW

Member
Sep 7, 2006
33
0
0
The 64-bit mode is most likely just 64-bit memory addressing. And you are not going to have more actual memory than can be addressed with a 32-bit processor. But you could address more virtual memory with a 64-bit system. So if you needed to keep more than 4 GB of data open at once in photoshop, you could do it. You'll be swapping like mad of course (using the page file to page in & out from 'virtual' to physical memory).

Most folks are interested in using the server-class 64-bit chips with 8 or 16 GB of RAM to run their Oracle or SQLServer (Or Exchange 2007 which requires 64-bit) apps. They want the advantage of using huge amounts of REAL memory to improve performance and avoid swapping, as well as huge virtual spaces.

Frankly I don't think you are going to get any boost from 64-bit, in fact it may run slower, given no increase in physical ram used. Why? In a 64-bit OS all your integers and floats are now defaulted to twice the size. Data may well take up more register space, more ram, and use more RAM bandwidth in the system.

But if you need the function, like you need to open a 6 GB file, 64-bit is the only way to go.

Also - watch out as in 64-bit drivers are harder to find.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: Fike
Originally posted by: Nothinman
If your apps are still 32-bit you'll still be stuck in their 2G VM limit.

And the larger address space doesn't just mean more physical memory, a process' address space gets used up by other things too.



So, I know that Photoshop CS2 and CS3 can operate in 64 bit mode. So that is okay. Your second statement baffles me. What do you mean by "...a process' address space gets use up by other things too."?

I don't know how much you understand about Virtual Memory.

As you hopefully know Virtual Memory has nothing at all to do with your swap file. (this is a horrific mistake perpetuated by bad Microsoft UI designers).

Each application has a address space. In 32bit x86 systems this is always around 4gigs worth of memory irregardless of what the actual physical ram is. Hence the term 'virtual ram', since the ram is virtualized or abstracted. (originally in non-multitasking OSes like MS-DOS the ram address space corrisponned to real ram addresses but this doesn't make sense to do that in multitasking systems.)

In Windows this address space is divided in a 2gig/2gig split. 2 gigs of the VM is reserved for application use and 2 gigs is reserved for kernel/operating system space.

So irregardless weither or not your system has 256 megs of real RAM with a 3 gig swap file or 64gigs of RAM in PAE mode on some server the maximum amount of memory your application will ever be allowed to use is 2 gigs. Some Windows systems support a 3gig/1gig split were applications that are specificly designed for it can use 3gigs.. but then you risk running out of ram on 1gig side.

That is why 64bit is important. If you ever want to use 3 or more gigs of ram in a paticular application the only practical way to do it is by moving up to 64bit VM.


And the original question, will a 64 bit app like photoshop work faster with Vista or XP Pro on the same PC that has 3 GB of RAM? ... or is it the same for both OSes?


Well if the version of Photoshop you have supports 64bit cpu then you probably will have a performance increase. With only 3 gigs of RAM your still realy limited to what 32bit system can do, but I expect that some photoshop operations can benifit from using the native 64bit mode proccessor over the 32bit mode.

It's not common right now for desktop applications to benifit from 64bit instructiosn vs 32bit, but I expect a native 64bit Photoshop application can.


(if your Photoshop app is realy 32bit running on a 64bit windows OS then I expect to have a slight performance decrease. It realy matters if Photoshop has been compiled specificly for 64bit system. I don't know if Adobe has native 64bit versions.)
 

ProviaFan

Lifer
Mar 17, 2001
14,993
1
0
To set the record straight, Photoshop CS2 has no 64 bit capability of any kind, and such things are not coming in CS3, either. Photoshop is /3GB aware, and allows access to this additional RAM on 32 bit systems with /3GB or on 64 bit systems.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
So if you needed to keep more than 4 GB of data open at once in photoshop, you could do it. You'll be swapping like mad of course (using the page file to page in & out from 'virtual' to physical memory).

Not necessarily, you can have more virtually memory allocated than you have total physical memory and still not touch the pagefile.

Why? In a 64-bit OS all your integers and floats are now defaulted to twice the size. Data may well take up more register space, more ram, and use more RAM bandwidth in the system.

Actually, no they're not. In almost every OS ints and floats are 32-bit for compatibilities sake. If you want 64-bit numbers you have to specificaly request them on both 32-bit and 64-bit systems. But 64-bit processes will use slightly more memory because pointers are 64-bit.

Data may well take up more register space,

But since AMD64 hardware has a lot more available GPRs in long mode it'll even out in the worst case and generally be a bit better.

But if you need the function, like you need to open a 6 GB file, 64-bit is the only way to go.

You can open 6G files just fine on 32-bit systems, you just can't expect to mmap the whole thing into your address space at once.

Photoshop is /3GB aware, and allows access to this additional RAM on 32 bit systems with /3GB or on 64 bit systems.

And to clarify, the /3GB switch changes the amount of virtual memory available to each process, not the physical. But in this case the physical increase is also implied because to be able to address that memory you need the extra virtual addresses.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Plus there is a good reason for the Windows 2/2 split. If you do 3/1 split you can run out of system resources, but probably not a issue for Photoshop.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Plus there is a good reason for the Windows 2/2 split. If you do 3/1 split you can run out of system resources, but probably not a issue for Photoshop.

Linux handles a 3/1 split just fine.
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
Originally posted by: drag
Plus there is a good reason for the Windows 2/2 split. If you do 3/1 split you can run out of system resources, but probably not a issue for Photoshop.
Yeah this can be an issue on pretty much any recent Windows machine. If you enable PAE in conjunction with /3GB, you can have problems because there is only 1GB of VM available to the kernel for PAE operations along with all the other kernel operations. PAE is enabled by default on any system with DEP enabled which is enabled by default on XP SP2, 2003 SP1 and Vista.
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
And to clarify, the /3GB switch changes the amount of virtual memory available to each process, not the physical. But in this case the physical increase is also implied because to be able to address that memory you need the extra virtual addresses.
Just thought I'd further clarify, your app must be aware of the /3GB switch or it doesn't do you any good.

Being as there seem to be so many on the forum lately just looking for us to give them the answers... :roll:
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Just thought I'd further clarify, your app must be aware of the /3GB switch or it doesn't do you any good.

Well technically you can mark any executable Large Address Aware with a tool in the reskit, but there's no way to know if the app will still work or if it'll crash after you do that.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: spyordie007
And to clarify, the /3GB switch changes the amount of virtual memory available to each process, not the physical. But in this case the physical increase is also implied because to be able to address that memory you need the extra virtual addresses.
Just thought I'd further clarify, your app must be aware of the /3GB switch or it doesn't do you any good.

Being as there seem to be so many on the forum lately just looking for us to give them the answers... :roll:

And to further clarify, on 64bit platforms 32 bit apps marked /3GB aware actually get 4gig os user space not just 3gig.
 

Fike

Senior member
Oct 2, 2001
388
0
0
Originally posted by: ProviaFan
To set the record straight, Photoshop CS2 has no 64 bit capability of any kind, and such things are not coming in CS3, either. Photoshop is /3GB aware, and allows access to this additional RAM on 32 bit systems with /3GB or on 64 bit systems.


Okay, point taken. What Photoshop does is allow you to benefit by some of the extra RAM when more than 4GB is installed (or by using the 3GB switch on a 32 bit OS). It also appears that above 4GB with a 64 Bit OS allows photoshop to use more memory for the scratch disk and for filters (I guess as other processes). Based upon the discussion above, this sounds a bit like marketing speak for it really doesn't do anything beyond take advantage of a full 3GB of RAM when 4GB is installed by dividing the app into different processes (which it probably already did).

See here:

Adobe Knowledgebase

New capabilities with 64-bit processors

Photoshop CS2 is a 32-bit application. When it runs on a 32-bit operating system, such as Windows 2000, Windows XP Professional, and Mac OS v10.2.8, it can access the first 2 GB of RAM on the computer. The operating system uses some of this RAM, so the Photoshop Memory Usage preference displays only a maximum of 1.6 or 1.7 GB of total available RAM. If you are running Windows XP Professional with Service Pack 2, you can set the 3 GB switch in the boot.ini file, which allows Photoshop to use up to 3 GB of RAM.

Important: The 3GB switch is a Microsoft switch and may not work with all computers. Contact Microsoft for instructions before you set the 3 GB switch, and for troubleshooting the switch. You can search on the Microsoft support page for 3gb for information on this switch.

When you run Photoshop CS2 on a computer with a 64-bit processor (such as a G5, Intel Xeon processor with EM64T, AMD Athlon 64, or Opteron processor), and running a 64-bit version of the operating system (Mac OS v10.3 or higher, Windows XP Professional x64 Edition), that has 4 GB or more of RAM, Photoshop will use 3 GB for it's image data. You can see the actual amount of RAM Photoshop can use in the Maximum Used By Photoshop number when you set the Maximum Used by Photoshop slider in the Memory & Image Cache preference to 100%. The RAM above the 100% used by Photoshop, which is from approximately 3 GB to 3.7 GB, can be used directly by Photoshop plug-ins (some plug-ins need large chunks of contiguous RAM), filters, actions, etc. If you have more than 4 GB (to 6 GB (Windows) or 8 GB (Mac OS)), the RAM above 4 GB is used by the operating system as a cache for the Photoshop scratch disk data. Data that previously was written directly to the hard disk by Photoshop, is now cached in this high RAM before being written to the hard disk by the operating system. If you are working with files large enough to take advantage of these extra 2 GB of RAM, the RAM cache can speed performance of Photoshop.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Okay, point taken. What Photoshop does is allow you to benefit by some of the extra RAM when more than 4GB is installed (or by using the 3GB switch on a 32 bit OS). It also appears that above 4GB with a 64 Bit OS allows photoshop to use more memory for the scratch disk and for filters (I guess as other processes). Based upon the discussion above, this sounds a bit like marketing speak for it really doesn't do anything beyond take advantage of a full 3GB of RAM when 4GB is installed by dividing the app into different processes (which it probably already did).

It just sounds like they marked CS Large Address Aware.
 

legacyNW

Member
Sep 7, 2006
33
0
0
"Not necessarily, you can have more virtually memory allocated than you have total physical memory and still not touch the pagefile. "

'Can' and 'will' are different though. Windows uses the page file all the time, certainly any app trying to load a file larger than physical ram is going to hit swap.

"You can open 6G files just fine on 32-bit systems, you just can't expect to mmap the whole thing into your address space at once. "

Let's be pratical here...my bad, should have said 'if you want to work effectively then 64-bit is the way to go. Whether the app works by partial mapping of the file into address (does its own mapping), or loads the whole file into (virtual) memory (or uses MS's memoery map of file), our testing shows that huge physical RAM has a startling effect on performance. If you are loading the whole file, obviously the OS can alloc physical RAM if it has it, and an app that works by doing its own memory-mapping will benefit from OS read buffers. Suck a whole filesystem up into buffer and you see a huge increase in performance.

Yeah my bad on the 64-bit ints, last time I read up on 64-bit WInNT64 stuff was still being designed.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
'Can' and 'will' are different though. Windows uses the page file all the time, certainly any app trying to load a file larger than physical ram is going to hit swap.

Any app trying to put the whole file into memory at once may force some pagefile usage, but if it's smart about it then no, it won't.

Let's be pratical here...my bad, should have said 'if you want to work effectively then 64-bit is the way to go.

Well millions of Windows users and servers have been "practically" working for years now, 64-bit software is still only necessary in niche areas.

our testing shows that huge physical RAM has a startling effect on performance.

No doubt, but dumping 12G of memory into a machine because it's running slow won't necessarily fix it.

Yeah my bad on the 64-bit ints, last time I read up on 64-bit WInNT64 stuff was still being designed.

I doubt it was even that way back then, unless MS made some really bad decisions out of the gate. Every 64-bit system I've seen has had their int and floats be 32-bit by default for compatibilities sake and MS is the king of compatibility.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,552
10,171
126
Originally posted by: Fike
Okay, point taken. What Photoshop does is allow you to benefit by some of the extra RAM when more than 4GB is installed (or by using the 3GB switch on a 32 bit OS). It also appears that above 4GB with a 64 Bit OS allows photoshop to use more memory for the scratch disk and for filters (I guess as other processes). Based upon the discussion above, this sounds a bit like marketing speak for it really doesn't do anything beyond take advantage of a full 3GB of RAM when 4GB is installed by dividing the app into different processes (which it probably already did).

See here:

Adobe Knowledgebase

New capabilities with 64-bit processors

When you run Photoshop CS2 on a computer with a 64-bit processor (such as a G5, Intel Xeon processor with EM64T, AMD Athlon 64, or Opteron processor), and running a 64-bit version of the operating system (Mac OS v10.3 or higher, Windows XP Professional x64 Edition), that has 4 GB or more of RAM, Photoshop will use 3 GB for it's image data. You can see the actual amount of RAM Photoshop can use in the Maximum Used By Photoshop number when you set the Maximum Used by Photoshop slider in the Memory & Image Cache preference to 100%. The RAM above the 100% used by Photoshop, which is from approximately 3 GB to 3.7 GB, can be used directly by Photoshop plug-ins (some plug-ins need large chunks of contiguous RAM), filters, actions, etc. If you have more than 4 GB (to 6 GB (Windows) or 8 GB (Mac OS)), the RAM above 4 GB is used by the operating system as a cache for the Photoshop scratch disk data. Data that previously was written directly to the hard disk by Photoshop, is now cached in this high RAM before being written to the hard disk by the operating system. If you are working with files large enough to take advantage of these extra 2 GB of RAM, the RAM cache can speed performance of Photoshop.
That seems like strange caching semantics for their scratchfile. One would think that it would use FILE_FLAG_WRITETHROUGH, and FILE_FLAG_NOCACHE, so as not to eat up RAM used for other things. Hopefully MS cleared up some of the endemic caching semantic bugs that has existed in prior versions of Windows. If you want to learn more about this mess, search for info on "cascopy" on StorageReview's forums. It has some tech info on the whole mess.
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
I'm surprised Adobe hasn't come out with an x64 version of Photoshop. It's an actual prosumer product that can take advantage of the extra RAM.