• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Windows 7 memory management: Available vs. Free

Miramonti

Lifer
I have 6gb's of memory, but 3gb are in a ramdisk alone, which generally leaves me 1.5gb of available memory when my database programs that I use for work are open.

However when I run these apps processing a heavy data load, I've noticed my available memory go down to ~400-800mb, while my "Free" memory is "0".

Windows 7 obviously has a much more dynamic caching ability than Windows xp.

Altho things seem to run pretty well as is, does this indicate they could potentially benefit from some operating efficiency by adding more ram?
 
Yes

Having 0 Free, while not harmful, is very close to needing to swap to disk. So unless that RamDisk is your Pagefile it will hurt 🙂
 
Or just stop wasting memory on a ram disk?

I see it's not as beneficial as it was in Winxp, but on the other hand there is a lot of frequent writing to the disk, so it atleast extends the life of the ssd.

Yes

Having 0 Free, while not harmful, is very close to needing to swap to disk. So unless that RamDisk is your Pagefile it will hurt 🙂

Thanks for the info.

Currently I have the pagefile turned off to maximize ssd life. I'm not sure how windows 7 handles that but I'm assuming it simply stops caching additional data and reads more from the disk.


/edit: Which brings up the question...if it's running on 0 free ram due to the extensive caching of programs running on a ramdisk...wouldn't the result be more reads from the ramdisk?... Maybe more ram wouldn't help me at all because it's the same i/o speed, unless at some point it seems to be destablizing Windows (which it hasn't seemed to yet.)
 
Last edited:
I'm a bit confused. If you page file is disabled and Windows hits its memory commit limit, Windows or your applications would crash, or Windows would create a page file for you. I fail to see how the ramdisk comes into play.
 
Would windows 7 create a pagefile when pagefiles are turned off?

Programs aren't crashing and there seem to be no windows instability effects when this much data is being cached from these programs. In fact, each program's database is 400-500mb's, and when the program is making heavy calculations off it's data, the equivalent of the entire database seems to be getting cached.

That's not something that the 32bit program requires, and this much caching is not a behavior that existed in winXp. There seems to be a dynamic cache-allocation algorithm in win7 basing it's caching on what's available...taking advantage of memory only if it is free, but not necessarily demanding it if it is not.

Anyhow, this is the behavior and outcome...what exactly is going on is what I'm trying to understand.
 
Yes

Having 0 Free, while not harmful, is very close to needing to swap to disk. So unless that RamDisk is your Pagefile it will hurt 🙂

This isn't really true. Any cached memory can be immediately used by windows if its requested by a program - aka windows re-purposes the cached memory to something [more] useful.

What then happens is that since the old cached data isn't cached anymore, it may take longer to load/use whatever that data was because it is now only on disk.
 
I see it's not as beneficial as it was in Winxp, but on the other hand there is a lot of frequent writing to the disk, so it atleast extends the life of the ssd.

And largely defeats the purpose of having the SSD. Why buy the hardware if you don't want to actually use it?

Currently I have the pagefile turned off to maximize ssd life.

That's worse than wasting memory on the ram disk, stop that too.

Would windows 7 create a pagefile when pagefiles are turned off?

Possibly, I know previous versions of Windows would because it's just not designed to run without one. NT4 and Win2K would just BSOD on startup if you didn't have one, but I think later they had it create a small one if one was missing. Although that behavior didn't seem to be consistent so it may depend on other factors as well.

That's not something that the 32bit program requires, and this much caching is not a behavior that existed in winXp. There seems to be a dynamic cache-allocation algorithm in win7 basing it's caching on what's available...taking advantage of memory only if it is free, but not necessarily demanding it if it is not.

XP did dynamic disk caching as well, it's just that Vista/Win7 try to do it smarter with SuperFetch.
 
"SuperFetch"...will have to look into that. I don't think I'm gaining by all this data getting superfetch into ram, since it's already in a ramdisk.

As for an ssd, I have to disagree...it has multiple purposes as opposed to "the purpose" of it. It brought overall roundtrip reboot times down using a 2gb ramdisk (backup image unloading/loading) from up to 18 minutes to 90 seconds, and is great for overall usage.

However durability of these is questionable and limited, and I'm not interested in wearing it any quicker than necessary by these fairly intensive r/w apps. I'd do the same for standard hd's too...why not, ram is cheap enough.

Performance wise tho, superfetch does seem to change things up and limit the benefits of a ramdisk compared to xp.
 
"SuperFetch"...will have to look into that. I don't think I'm gaining by all this data getting superfetch into ram, since it's already in a ramdisk.

I.e. your performance hacks are interfering with the system.

However durability of these is questionable and limited, and I'm not interested in wearing it any quicker than necessary by these fairly intensive r/w apps. I'd do the same for standard hd's too...why not, ram is cheap enough.

But your pagefile usage should be near zero with that much memory and you're already paging to/from hundreds of other locations on the disk anyway. You're most likely removing a statistically insignificant portion of writes and potentially causing other problems for yourself.

Performance wise tho, superfetch does seem to change things up and limit the benefits of a ramdisk compared to xp.

Ramdisks had very little benefit before and with time that niche has gotten smaller and smaller.
 
I think you should use a different utility to really see where your memory usage is at. The windows task manager isn't too good at all the details.
You can download process explorer from the MS site and that will show exactly where the memory is being used rather than just a blanket amount in use by windows.
http://technet.microsoft.com/en-us/sysinternals/bb896653

After install click the system information button
output looks like this:
image2ni.jpg
 
I think you should use a different utility to really see where your memory usage is at. The windows task manager isn't too good at all the details.
You can download process explorer from the MS site and that will show exactly where the memory is being used rather than just a blanket amount in use by windows.
http://technet.microsoft.com/en-us/sysinternals/bb896653

After install click the system information button
output looks like this:
image2ni.jpg

Thanks, I'll keep an eye on things for a while with this.
 
superfetch is disabled if your windows 7 partition is on SSD drive. It will appear as running; but it won't do what it does normally on mechanical hard drives.

Even in XP data loaded from disk will stay in RAM.
 
Currently I have the pagefile turned off to maximize ssd life. I'm not sure how windows 7 handles that but I'm assuming it simply stops caching additional data and reads more from the disk.

You shouldn't run without a swap file. From a performance standpoint it's not really necessary with enough ram, however some programs do not work properly if they don't detect at least a minimal swap. I have 6GB ram but still maintain a fixed 1GB swap file for compatibility. As for your SSD, just put the swap file on another drive. If you don't have another harddrive, a cheap 2GB USB flash drive would do the trick. My .02
 
You shouldn't run without a swap file. From a performance standpoint it's not really necessary with enough ram, however some programs do not work properly if they don't detect at least a minimal swap. I have 6GB ram but still maintain a fixed 1GB swap file for compatibility. As for your SSD, just put the swap file on another drive. If you don't have another harddrive, a cheap 2GB USB flash drive would do the trick. My .02

AFAIK Windows won't let you put a pagefile on a removable disk, so a hard disk (or some way to trick Windows into thinking the flash drive isn't removable) is necessary.
 
Back
Top