Solved

windows xp virtual memory

Posted on 2011-09-03
22
426 Views
Last Modified: 2012-06-21
back in the day, i remember hearing that if you put the virtual memory of winXP on a seperate hard drive ( so the system disk is on IDE1, and the disk with the virtual memory is on IDE2 ) then you will see a performance increase.
i have tried this and it did seem to work. however as the drive aged i think it made things worse - or maybe the disk just needed formatting - but anyhow, it got me thinking. what if you could make windows virtual memory only exist in the actual memory?
so in any flavor of windows, is there a way to force virtual memory to just run in actual memory and NOT on the hard drive?
0
Comment
Question by:JeffBeall
  • 4
  • 4
  • 3
  • +8
22 Comments
 
LVL 19

Accepted Solution

by:
lamaslany earned 50 total points
ID: 36478753
You can completely remove the page file but there are some applications that do not like it.  It may be better to just make a very small pagefile.

How much RAM do you have in your machine?  

0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 36478756
Then it wouldn't be 'virtual'.  The purpose of 'virtual' memory is to swap out sections of RAM (real) memory that are not being currently used to make room for something that is needed.  It makes 512MB of RAM act (slowly) like 2GB of RAM.
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 36478935
i get the whole "virtual" thing. but it seems to me to be an out dated concept left over from the days when ram wasn't cheap and before 64bit addressing came around and windows couldn't address a huge amount of ram.
i must admit that windows 7, to me, seems to handle memory very well.
i just always look for ways to increase speed.
0
 
LVL 23

Assisted Solution

by:Dr. Klahn
Dr. Klahn earned 50 total points
ID: 36478937
lamaslany is correct.  Virtual memory can be set to zero, but this does not result in a system that operates quickly, properly, and entirely in available RAM.  Instead, it causes many applications to fault with unusual errors.  Virtual memory is used for numerous things besides paging applications that are too big for available memory.  I tried this configuration about three years back, and within two days I rejected it as unusable.
0
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 50 total points
ID: 36478964
Linux and Windows including Windows 7 don't think it's outdated.  When you give programmers more memory, they make larger programs.  In the operation of a computer, there are layers of memory.  Disk is usually the largest and slowest and the CPU registers are the smallest and fastest.  In between, there are two layers of cache and your main RAM memory.  Though different methods are used for the different layers, it's still similar concepts where you swap in the data you need right now to the next higher level.  All of that is done to speed up the computer.
0
 
LVL 6

Expert Comment

by:joeyfaz
ID: 36479221
Virtual memory helps the OS manage real ram more efficiently, and it doesn't matter whether it's Linux or Windows (although each os uses it differently), in the end it's better for the OS no matter how much physical ram you have installed. You are best off leaving it on. Also, you might even want to enable it on the system drive (usually C:) so that windows gets a full dump file in the case it crashes, otherwise you just get a mini dump file which does not help in most of the cases of troubleshooting the root cause.
0
 
LVL 10

Expert Comment

by:LMiller7
ID: 36479251
Putting the pagefile in RAM is a BAD idea.
The pagefile is not virtual memory, although much user level Microsoft documentation implies that it is. Virtual memory is broad topic and the pagefile is only a small part of it.

The pagefile is used as a place to offload rarely used data, thus leaving more RAM available for more important purposes. If the pagefile is in RAM this will mean moving data from one place in RAM to another place in RAM. In many cases there will be exact duplicates of data in two places in RAM. I call that wasteful and a serious waste of precious RAM.

Paging isn't exclusive to the pagefile. Paging involves executable files, DLL's, cached data files, etc., and this form of paging does not use the pagefile at all. Of all paging only about 10% will involve the pagefile. Placing the pagefile in RAM will do nothing for the other forms of paging, and thanks to the RAM lost to the pagefile, there be more of it.

Many people misinterpret the Task Manager display and see a large amount of "Available" memory and consider this free and unused memory. Not so. Most of this will actually be in use. In a modern OS having memory that is both in use and available is not a contradiction.

However much RAM you have you will better served by letting the system manage it as it wants to. It really does know best.

People who promote putting the pagefile in RAM are doing it out of ignorance of how the pagefile is used.

There is much more that could be said about this but I will stop now.
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 36479293
i like these questions when i learn new things.
given what has been said though. it really did seem like a boost in performance when i put the page file or "virtual memory" on a drive other than the system drive. i'm not sure why that would be.
0
 
LVL 6

Assisted Solution

by:joeyfaz
joeyfaz earned 50 total points
ID: 36479307
Ok, so to answer your question specifically, I'd advise against disabling virtual memory. It becomes more of a nuisance than anything else because programs can complain or not even run properly and there is not much of a noticable difference when disabling it. As far as putting the page file on a drive other than the system drive, it would be fine, you just need to consider if in the event the computer crashes on you, how important it would be to determine the root cause of the crash because of the fact that you cannot get a full memory dump when there is no page file setup on the system drive.
0
 
LVL 10

Expert Comment

by:Arman Khodabande
ID: 36479451
I remember that I used the suggestion to disable the virtual memory once.
But I constantly got the "low virtual memory" pop-up message.
I had a lot of Ram and wanted to force windows to use it but windows rejected the high speed Ram and wanted to use slow pagefile !
I was forced to re-enable that stupid pagefile !
Having 3 Gigabytes of ram and not using it to speed-up things!
0
 
LVL 10

Expert Comment

by:Arman Khodabande
ID: 36479454
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Assisted Solution

by:vk3kjc
vk3kjc earned 50 total points
ID: 36479472
You mention that as the disk gets older it is getting slower. Have you defragmented your disk at all? Has your pagefile become fragmented? Is it the only file on the second disk or do you use it for other files?

I always set my minimum and maximum pagefile size to be the same so it creates a single contiguous pagefile.
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 36479774
^^ same here ^^  If you have a LOT of memory and I'm not just talking 8G of ram or don't run many memory intensive operations at once you can improve things but you will never get rid of the pagefile.
Putting it on a SSD will speed things up but a ramdisk will actually slow things down. And yes putting the pagefile on a separate spindle does improve things as long as that drive is mainly a storage drive and not accessed a lot. If you have 3G or more you might want to stop windows from offloading its dll's and to keep them in memory (memory is faster than a hard disk).. at the moment I have 2.507G cached ram, and 2.454 available of my total 8G of Ram. (69% of physical memory) and the only thing other than perfmon is my sidebar gadgets accessing the pagefile.
0
 
LVL 3

Assisted Solution

by:WiReDWolf
WiReDWolf earned 50 total points
ID: 36480048
If you have a lot of RAM add the /3G switch to your boot.ini though I'm not sure it would help much in Windows 7 and only works with 32-bit operating systems:

http://www.maxi-pedia.com/3GB+switch+Windows+boot.ini+3+GB

To answer your question about the performance difference - if you put your swap file on a separate physical hard drive then your disk I/O on your first drive is greatly reduced as you are now using the combined capabilities (I/O) of both drives at the same time.  However, this would only be truly effective with IDE drives.  SAS or the older SCSI drives use an asynchronous read/write that isn't nearly as limited as IDE.

If you *really* want to get efficient I'd recommend going with a Solid State Drive (SSD) instead.  No moving parts - makes them wicked fast and actually generates quite a bit less heat.  I see ve3ofa mentions this as well.

Read the article on /3G - it's good at explaining the purpose and use of the swap file.
0
 
LVL 10

Expert Comment

by:LMiller7
ID: 36480310
The article mentioning the /3GB switch above is correct but so many people misinterpret it. It has nothing to do with how much RAM you have or how it will be used. It also has nothing to do with the pagefile.

By default the 4GB virtual address space is split 2GB system - 2 GB per process. This is independent of RAM size. The switch changes this to 2 GB system - 3 GB per process. Only processes that explicitly indicate this will benefit and most are not. It also has some negative implications.

Do not use the switch unless you have applications that either require or will significantly benefit from it. Otherwise it will likely impair performance.

With or without the switch, RAM allocation between the system and applications is dynamically controlled by the memory manager. It has always been this way on the NT platform.
0
 
LVL 10

Expert Comment

by:Arman Khodabande
ID: 36480392
By now I learned that:
1) Pagefile can not be disabled completely.
2) Putting pagefile on Ram is not a good idea. (Is it possible at all? how? ! ! !)
3) Defragmenting the pagefile has a great effect on performance. (I knew it already and do it regularly)
4) Putting pagefile on separate HDD or SSD will improve performance greatly.

Alright.
Now let's get back to the authors question and ask a related question! (I ask for permission of the author!)
Why you say that putting a pagefile in another drive will increase performance?
I remember that once I used a software (I think it was "Tweak XP") and it shrunk my system drive and made a separate drive and put pagefile in it. The software said that after rebooting you'll see a performance increase. I had it for a while and never saw an increase (But may also decrease)!
What's the trick behind this?
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 36480434
kpax77, i don't mind you asking questions in my question. i believe in the Exchange part of this website. we all benefit by the questions people ask.
as far as the performance benefit. i think i saw benefits. however it was on older IDE computers. i have not tried this with SATA. and like WireDWolf mentioned, maybe it wouldn't work with SATA.
since it is releated to IDE which is going away, this could be a dated question, however, i am learning things about memory handling, so i guess it's still good to ask.
0
 
LVL 10

Assisted Solution

by:Arman Khodabande
Arman Khodabande earned 50 total points
ID: 36480470
Thanks JeffBeall.

But I think being on IDE or SATA doesn't matter if you're using separate partition (not separate hard disk).
And knowing that SATA is more efficient than IDE, we can conclude that putting pagefile on separate SATA HDD will increase performance unless there is an issue that WireDWolf knows it only.
0
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 50 total points
ID: 36481371
Actually with IDE drives running the pagefile on a separate spindle on a different controller gives the most increase instead of a slave drive where the system disk is on the master.  The biggest item is on a separate spindle (physical drive vs logical drive)
0
 
LVL 10

Assisted Solution

by:LMiller7
LMiller7 earned 50 total points
ID: 36481902
Under some situations it may be beneficial to place the pagefile on a separate physical drive, not separation partition. But this will only be significant if the pagefile is a bottleneck and it usually isn't.

Most attempts at optimizing the pagefile are wasted effort.
0
 

Assisted Solution

by:ryanjones
ryanjones earned 50 total points
ID: 36482237
0
 
LVL 1

Author Closing Comment

by:JeffBeall
ID: 36503223
wow! what a great response! thanks for all the comments.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now