Jump to content

so much unused RAM


BigDaddy

Recommended Posts

Eversince I got a GIG of ram on this PC I have been wondering off an application that would utilize this empty RAM. While doing daily activities only about 400MB of RAM is full the rest is empty.

So is there an app that would cache most frequently lunched apps into memory. For instance I would like to have FIREFOX cached so that when I click on the icon it would open in a sec instead of waiting to be read from the HDD.

ps. I hear Vista has this feature. But is it possible to have it on XP also?

Link to comment
Share on other sites


Do you mean like enable Super-Fetch in windows XP-SP2?

http://www.tbreak.com/forums/showthread.php?t=29826

Read the whole thread.

Or just setting up prefetch in XP?

http://www.microsoft.com/whdc/driver/kernel/XP_kernel.mspx ---- middle of page.

Logical Prefetcher for Faster Boot and Application Launch

When a Windows XP-based system is booted, data is saved about all logical disk read operations. On later boots, this information is used to pre-fetch these files in parallel with other boot operations. During boot and application launch, a Windows system demands and pages a sizable amount of data in small chunks (4K to 64K), seeking between files, directories, and metadata. The Logical Prefetcher, which is new for Windows XP, brings much of this data into the system cache with efficient asynchronous disk I/Os that minimize seeks. During boot, the logical prefetcher finishes most of the disk I/Os that need to be done for starting the system in parallel to device initialization delays, providing faster boot and logon performance.

Logical prefetching is accomplished by tracing frequently accessed pages in supported scenarios and efficiently bringing them into memory when the scenario is launched again. When a supported scenario is started, the transition page faults from mapped files are traced, recording which page of a file is accessed. When the scenario has completed (either the machine has booted or the application started), the trace is picked up by a user-mode maintenance service, the Task Scheduler. The information in the trace is used to update or create a prefetch-instructions file that specifies which pages from which files should be prefetched at the next launch.

The user-mode service determines which pages to prefetch by looking at how successful prefetching has been for that scenario in the past, and which pages were accessed in the last several launches of the scenario. When the scenario is run again, the kernel opens the prefetch instructions file and asynchronously queues paging I/O for all of the frequently accessed pages. The actual disk I/Os are sorted by the disk drivers to go up the disk once to load all pages that are not already in memory. This minimizes seeks, cuts down on disk time, and increases performance. The kernel also prefetches the file system metadata for the scenario, for example, MFT entries and directory files. Because prefetching is useful only when the required data is not in memory, the applications that are launched frequently are not traced and prefetched each time.

Settings for Logical Prefetch

Registry setting:

HKEY_LOCAL_MACHINESYSTEMCurrentCo ntrolSetControlSession

ManagerMemory ManagementPrefetchParameters

RootDirPath - Key Name

Reg_SZ _ Data Type

Prefetch - Value <default>

Value Names:

EnablePrefetcher (DWORD)

0x00000001= application launch prefetching

0x00000002= boot prefetching

Parameters are ANDed, so if all were enabled, the setting would be 0x00000003. The setting takes effect immediately. In Windows Server 2003 editions and later versions, only the boot prefetch is enabled by default. Application prefetch can be enabled by the registry setting cited here. The system boot prefetch file is in the %systemroot%Prefetch directory. Although these prefetch-readable files can be opened using Notepad, they contain binary data that will not be recognized by Notepad. If you are going to view these file, make them read only or copy them to a different location before opening.

To just add an application to your pre-fetch list----

1) Right-click on the application's shortcut and chose Properties.

2) Add "/prefetch:1" at the end of the value in the Target field.

This will add the application to windows prefetch so that the application will be loaded into memory when you boot.

Available in XP Pro up.

To make sure that you have prefetch enabled.

1. Start | run | regedit. 2. Navigate to the following key

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMemory ManagementPrefetchParametersEnablePrefetcher

There are four possible values for this key. 0 disables prefetch, which is HIGHLY discouraged. 1 tweaks the prefetcher for application launch. 2 tweaks the prefetcher for boot speeds. 3 tweaks it for both (which is what we want.).

Once you have that value in place, restart your computer.

Edited by puntoMX
Link to comment
Share on other sites

SUPERFETCH is a myth right?

And also putting /prefetch:1 is a myth since Windows does this automaticly when lunching certain apps.

But I am talking of something that would load the whole executable into memory so it would launch only from RAM and wouldn't even need HDD. And it should copy the frequently used application into free memory and also delete them from memory if the need for more RAM arises.

Does such an app exist in windows?

Link to comment
Share on other sites

RAM DRIVE is bad because I would have to manually copy it everytime and also it doesn't free up RAM when needed.

Firefox was just an example of what I would like to achieve.

Since I usually have 600MB RAM free which does nothing I thought that a program existed that would fill the empty ram with the data that are most frequently used from the disk. And so the next time I would launch a program it would already be in the RAM and thus would startup instantly

Link to comment
Share on other sites

Since I usually have 600MB RAM free which does nothing I thought that a program existed that would fill the empty ram with the data that are most frequently used from the disk. And so the next time I would launch a program it would already be in the RAM and thus would startup instantly

There is, but you need Vista for it - superfetch.

Link to comment
Share on other sites

If you want to make use of that extra RAM for a good cause, join the MSFN Rosetta@Home team. Your system will crunch data on idle CPU cycles and make use of all that spare RAM. ;)

If you're worried about a performance hit, I've found that I get about a 1-2% performance hit when running Rosetta@Home while doing everything else (XviD encodes take about 6-7mins longer on a 4 hour encode). It's really not enough to make it noticable, but you're helping a good cause. :)

Link to comment
Share on other sites

Or SETI@Home... :whistle:

But what I want to add to this thread is that under Unix systems (FreeBSD specifically), any unused RAM is allocated to the cache. So if you are using only 512MB of RAM in a machine that has 2GB RAM, then the other 1536MB RAM is used for cache. The kernel will keep between 1-5MB of memory free though in case a program does a memory allocation. But, if you load a program that wants a big chunk of memory, then the kernel will start dumping the cache pages to free up memory. If the cache page is marked dirty though, then it's flushed to the disk and then freed. The latter situation doesn't happen too often though because there's a kernel level process that scans the active memory pages looking for any that are dirty and sends them to the disk.

I talked at length to a couple of the people who designed the setup that FBSD uses, and I have to say it was a very interesting conversation. The entire scheme is based on a series of design decisions, trade offs, and compromises that affect performance in different areas. Tweaking one part may increase performance in one area, but decrease it in another. Windows is no different. I read somewhere about why Windows NT 4.0 does a switch to a different processor when a thread comes back into context. Their answer was because it increases the performance of SQL Server.

Link to comment
Share on other sites

If you want to make use of that extra RAM for a good cause, join the MSFN Rosetta@Home team. Your system will crunch data on idle CPU cycles and make use of all that spare RAM. ;)

If you're worried about a performance hit, I've found that I get about a 1-2% performance hit when running Rosetta@Home while doing everything else (XviD encodes take about 6-7mins longer on a 4 hour encode). It's really not enough to make it noticable, but you're helping a good cause. :)

I just want to use the extra RAM for faster application launch something similar that LINUX has. And I find it ashame that it does not get used all of the time. And also if I would be running such an app my FANS would be on FULL speed since they are temperature controlled and I like my PC as quite as possible.

Or SETI@Home... :whistle:

But what I want to add to this thread is that under Unix systems (FreeBSD specifically), any unused RAM is allocated to the cache. So if you are using only 512MB of RAM in a machine that has 2GB RAM, then the other 1536MB RAM is used for cache. The kernel will keep between 1-5MB of memory free though in case a program does a memory allocation. But, if you load a program that wants a big chunk of memory, then the kernel will start dumping the cache pages to free up memory. If the cache page is marked dirty though, then it's flushed to the disk and then freed. The latter situation doesn't happen too often though because there's a kernel level process that scans the active memory pages looking for any that are dirty and sends them to the disk.

This is where I got the idea in the first place about utilizing all of the available RAM on Windows XP also.

You may find this interesting.

:hello:

But that site is only for 4GB problems on 32bit system. I fail to see the relevance here

Edited by BigDaddy
Link to comment
Share on other sites

Windows XP does cache files to a degree, at least any programs that you had opened. It might not show this, or do it as well as some *nix variants (or Vista), but that RAM isn't all wasted. You just don't know that it's being used.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...