How Does Windows Assign Available Memory

Perris Calderon

dealer
Staff member
Political Access
Joined
24 Jan 2002
Messages
12,374
I've seen all over the internet, "How much memory is too much.

The actual answer, is the size of your disk, if you can get all data on disk into memory, the computer will see very little latency.

I've also seen questions like, "how many cores are too many"

The answer there is, you can use as many cores and processors as you have threads active at any one time., so that all threads get every quanta the request without que.

Most operating systems today have policies putting as much data in memory as possible, the saying goes, “free memory is wasted memory”

In the perfect world, we'd have enough cores and processors to accommodate every thread, enough memory to accommodate all your data.

Here’s an example for memory distribution by Windows.

We're looking at this graph, which you'll find in resource manager, this box has 12 gigs of memory



“Hardware reserved” is dedicated by Windows for bios, some drivers and peripherals.
  • “In use” is memory actually being accessed in real time.
  • “Modified” is memory that's backed with pagefile, (unmodified memory does not get backed in the pagefile, unmodified are backed in the exe’s and dll’s that data originated)
  • “The standby list” is memory not in use, but retaining data for launch since you’re not under memory pressure, Windows cached some data from programs you launched and closed and superfetch pre-loaded items according to your use, all this for faster access.
  • “Free” is ram doing absolutely nothing, the more free memory, the more going wasted. (notice it’s only 15mbs, this is excellent caching strategy by windows, you don’t want excessive free ram)
As you see from the graph, To get to this graph, I'm actually only using about 6.5 gigs of memory, Windows took the opportunity to put more than 4 gigs of memory to use

I have a 512 gig SSD, if I had 256 gigs of memory, in the best case scenario, most of that would wind up populating ram.

To get to this graph fo ryourself, hit the windows key, begin typing “resource”, click the resource monitor once it pops up



Click that, get this, on the bottom is your graph.

 

American Zombie

Moderator
Staff member
Political Access
Joined
23 Jun 2004
Messages
2,961
Mine does not look like that at all.

B450 Tomahawk Max

Ryzen 7 3800x

16GB DDR4

GTX 1660 TI 6GB

Win 10 x64 Pro

Screenshot 2020-09-25 084935.jpg



Screenshot 2020-09-25 083046.jpg
 

Perris Calderon

dealer
Staff member
Political Access
Joined
24 Jan 2002
Messages
12,374
I wonder if you just booted the system or you turned off superfetch?
I hardly ever boot I always stand by
 
Last edited:

American Zombie

Moderator
Staff member
Political Access
Joined
23 Jun 2004
Messages
2,961
Superfetch is disabled automatically by Windows if your SSD is fast enough. If the SSD is not that fast then superfetch and prefetch will stay enabled. The "superfetch" service no longer exists in Windows 10 as it was merged into the SysMain service, which handles more than just SuperFetching.

I have a Samsung 850 evo ssd.

From: Don’t Waste Time Optimizing Your SSD, Windows Knows What Its Doing

Disable Superfetch and Prefetch: These features aren’t really necessary with an SSD, so Windows 7, 8, and 10 already disable them for SSDs if your SSD is fast enough.

I looked in the registry and do not even have a EnableSuperfetch entry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters

What build of Win 10 are you on?

I am on latest release.

1601056826393.png
 

Perris Calderon

dealer
Staff member
Political Access
Joined
24 Jan 2002
Messages
12,374
Superfetch isn't turned off by default with any SSD Zombie

Regedit shows you prefetch, that's not related to superfetch.

You're right, they changed the service name of superfetch, but it still there, and it's improved

1601060494987.png


1601060539962.png


My build is 20215.1000

Here's Russinovich


I have a very fast toshiba nvme, one of the fastest at the time purchased, 99 percentile 2 years ago, now there are faster, this is only 78 percentile today, superfectch has always been enabled by default

That site you linked is incorrect, I never enabled superfetch, it's always been on, I would have turned it on if it was off, but no need

Superfetch isn't anything like prefetch, which has to do with disk placement for fastest load times, yes, that was for HDDs and does nothing I can think good for an SSD

Superfetch doesn't do that, it loads programs into memory according to your usage, and actually does it according to your usage based on the time of day, mornings might be different than evening

Read Marks writing on the subject it's great info.

Why would someone think this isn't a boon with an ssd?

If the operating system can get your disc into unused ram, this is fantastic, why would someone want that off no matter how fast their hard drive?

I actually predicted pre-loading data into ram when you have enough, here on ossn about ten years ago, later I'll try to find that discussion, some said I was crazy back then, I insisted.

Preloading unused ram with data you're likely to access is a benefit no matter how fast your ssd

Anyway, going to the beech, see you later
 
Last edited:

American Zombie

Moderator
Staff member
Political Access
Joined
23 Jun 2004
Messages
2,961
Yes it it running.

Screenshot 2020-09-25 122410.jpg


Backed up system with Macrium so I could reinstall after testing then I did a clean install of 2004 and all the memory stats in resource manager were the same as my previous screenshot.
 

Perris Calderon

dealer
Staff member
Political Access
Joined
24 Jan 2002
Messages
12,374
In that case, I don't know why mine is caching more than yours, except for possibly longer uptime, I never re-boot unless there's an update

Sorry :(
 

Perris Calderon

dealer
Staff member
Political Access
Joined
24 Jan 2002
Messages
12,374
Yes it it running.

I did a reboot to see how long Windows takes to pro-actively populate memory on my box, first is just after boot, second is about 5 minutes in, while typing this response, third is seconds later, fourth is about a half hour, eventually it will get close to zero
1601118755540.png
1601118855556.png

1601118925107.png

1601122701764.png
 

Perris Calderon

dealer
Staff member
Political Access
Joined
24 Jan 2002
Messages
12,374
From about that point I put the box to sleep, went out for some tennis, now, after waking, playing chess online and watching some vids, the Windows cached just about all the ram on my box, I'm using about 6 gigs realtime, about six gigs is cached, just about everything I launch now will be launched as if it's already running
1601151739138.png
 

American Zombie

Moderator
Staff member
Political Access
Joined
23 Jun 2004
Messages
2,961
Mine uses up free memory too (got all the way down to 0 MB) depending on how much I have open but then the free memory increases again after closing the program or game.

Have you ever seen what it says about the free memory if you mouse over it?

Image1.jpg
 

Perris Calderon

dealer
Staff member
Political Access
Joined
24 Jan 2002
Messages
12,374
Mine goes down to zero with nothing but browsers open

Ya, I've read it
1601420299243.png


Since it can't be too verbose, the box is already too big, it winds up being incomplete

Free memory doesn't get used first if the data called in in the standby list.
 

Attachments

  • 1601420278460.png
    1601420278460.png
    20.7 KB · Views: 1
  • 1601420291397.png
    1601420291397.png
    20.7 KB · Views: 1

Members online

No members online now.

Latest profile posts

Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.
Terrahertz wrote on Electronic Punk's profile.
Yo fellas!
Electronic Punk wrote on Sazar's profile.
Where are you buddy?
Perris Calderon wrote on Electronic Punk's profile.
Hey EP! All good with me, applying for Microsoft MVP right now, should have done this a while ago.

Notifications don't work, I only found your response by coming back to hunt up some threads, if you want, give me your email address so we can keep in touch easier!
Perris Calderon wrote on Electronic Punk's profile.
EP, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there!

Forum statistics

Threads
61,997
Messages
673,412
Members
5,590
Latest member
AntonioPR