Virtual Memory
-
I started a new job recently and took with me what I thought was a reasonably high-spec machine running an AMD 4 core chip and 8GB of RAM (64bit Windows 7) and a very fast solid state disk. But Visual Studio (with resharper) seems to be killing it. Our solution does have about 130 projects in it. I thought with having 8GB and all I might try turning virtual memory off. When I do this, it asks for a reboot and I found its still on afterwards. So quite frankly I don't know how to do this. Anyway, I wonder why we still have VM in an age of super cheap real RAM. I think various things like memory mapped files use it behind the scenes, but otherwise can't see the purpose. Interested in opinions here or a definitive answer. Paging file is 8GB. What would happen if I went up to 16GB [of RAM]? How can I make this thing faster?
Regards, Rob Philpott.
-
I started a new job recently and took with me what I thought was a reasonably high-spec machine running an AMD 4 core chip and 8GB of RAM (64bit Windows 7) and a very fast solid state disk. But Visual Studio (with resharper) seems to be killing it. Our solution does have about 130 projects in it. I thought with having 8GB and all I might try turning virtual memory off. When I do this, it asks for a reboot and I found its still on afterwards. So quite frankly I don't know how to do this. Anyway, I wonder why we still have VM in an age of super cheap real RAM. I think various things like memory mapped files use it behind the scenes, but otherwise can't see the purpose. Interested in opinions here or a definitive answer. Paging file is 8GB. What would happen if I went up to 16GB [of RAM]? How can I make this thing faster?
Regards, Rob Philpott.
-
This makes no sense. You can't turn virtual memory off. And if you could, everything would die. You're supposed to be able to turn off the page file though, but it's not listening you say.. maybe you can cheat and set its maximum size to zero.
My understanding is that virtual memory is faciliated by the page file, so by turning that 'off' I am effectively turning of VM. Is this not the case?
Regards, Rob Philpott.
-
My understanding is that virtual memory is faciliated by the page file, so by turning that 'off' I am effectively turning of VM. Is this not the case?
Regards, Rob Philpott.
Not at all. Virtual memory is much more than paging. If you want no virtual memory, you need an OS that doesn't use it - DOS for instance.
-
I started a new job recently and took with me what I thought was a reasonably high-spec machine running an AMD 4 core chip and 8GB of RAM (64bit Windows 7) and a very fast solid state disk. But Visual Studio (with resharper) seems to be killing it. Our solution does have about 130 projects in it. I thought with having 8GB and all I might try turning virtual memory off. When I do this, it asks for a reboot and I found its still on afterwards. So quite frankly I don't know how to do this. Anyway, I wonder why we still have VM in an age of super cheap real RAM. I think various things like memory mapped files use it behind the scenes, but otherwise can't see the purpose. Interested in opinions here or a definitive answer. Paging file is 8GB. What would happen if I went up to 16GB [of RAM]? How can I make this thing faster?
Regards, Rob Philpott.
As others have said, you can turn off page file (http://i.imgur.com/k080w.jpg[^]), not virtual memory which has much boarder meaning. As for why we still use page files, well it allows system to swap out memory used by inactive processes and use that memory to cache frequently used files.
-
My understanding is that virtual memory is faciliated by the page file, so by turning that 'off' I am effectively turning of VM. Is this not the case?
Regards, Rob Philpott.
-
My understanding is that virtual memory is faciliated by the page file, so by turning that 'off' I am effectively turning of VM. Is this not the case?
Regards, Rob Philpott.
There're other things that VM manages, like access control, process isolation, delayed loading of code and data from the executables, sharing physical memory between processes that use common libraries, COW...
-
I started a new job recently and took with me what I thought was a reasonably high-spec machine running an AMD 4 core chip and 8GB of RAM (64bit Windows 7) and a very fast solid state disk. But Visual Studio (with resharper) seems to be killing it. Our solution does have about 130 projects in it. I thought with having 8GB and all I might try turning virtual memory off. When I do this, it asks for a reboot and I found its still on afterwards. So quite frankly I don't know how to do this. Anyway, I wonder why we still have VM in an age of super cheap real RAM. I think various things like memory mapped files use it behind the scenes, but otherwise can't see the purpose. Interested in opinions here or a definitive answer. Paging file is 8GB. What would happen if I went up to 16GB [of RAM]? How can I make this thing faster?
Regards, Rob Philpott.
This may be entirely unrelated, but it's an interesting coincidence. While trying to speed up a slow-moving system of a similar configuration, I bought a registry scanner/cleaner from Uniblue. It didn't solve the problem, but it seemed to help. What is coincidental, though, is that I woke this morning to find a message that an automated scan had found 86 registry errors. Instead of simply instructing it to fix the errors, I took the time to view them for a change. All of them were Invalid Path errors pointing to components of Visual Studio, and appeared to be references to parts of the .Net 4.0 library. I've used Visual Studio exactly once in the past month, and that only to open a small project I haven't had time to complete. As I said, this may be entirely irrelevant, but it also might be a clue to solving the problem, since it specifically involves Visual Studio.
Will Rogers never met me.
-
I started a new job recently and took with me what I thought was a reasonably high-spec machine running an AMD 4 core chip and 8GB of RAM (64bit Windows 7) and a very fast solid state disk. But Visual Studio (with resharper) seems to be killing it. Our solution does have about 130 projects in it. I thought with having 8GB and all I might try turning virtual memory off. When I do this, it asks for a reboot and I found its still on afterwards. So quite frankly I don't know how to do this. Anyway, I wonder why we still have VM in an age of super cheap real RAM. I think various things like memory mapped files use it behind the scenes, but otherwise can't see the purpose. Interested in opinions here or a definitive answer. Paging file is 8GB. What would happen if I went up to 16GB [of RAM]? How can I make this thing faster?
Regards, Rob Philpott.
Virtual memory is a feature not a bug. And no, your application isn't going to soon reveal the structure of the Universe in the pre-Plank era. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
I started a new job recently and took with me what I thought was a reasonably high-spec machine running an AMD 4 core chip and 8GB of RAM (64bit Windows 7) and a very fast solid state disk. But Visual Studio (with resharper) seems to be killing it. Our solution does have about 130 projects in it. I thought with having 8GB and all I might try turning virtual memory off. When I do this, it asks for a reboot and I found its still on afterwards. So quite frankly I don't know how to do this. Anyway, I wonder why we still have VM in an age of super cheap real RAM. I think various things like memory mapped files use it behind the scenes, but otherwise can't see the purpose. Interested in opinions here or a definitive answer. Paging file is 8GB. What would happen if I went up to 16GB [of RAM]? How can I make this thing faster?
Regards, Rob Philpott.
Virtual Memory provides the ability for multiple applications to use the same address in their own process scope. The OS takes care of the ugly details of mapping the process local (virtual) address to the actual physical address in RAM. Without virtual memory, it would be much more difficult to make multiple applications work together on a single computer. As others have said, Virtual Memory is different from the Page File that you are describing.
All of my software is powered by a single Watt.
-
I started a new job recently and took with me what I thought was a reasonably high-spec machine running an AMD 4 core chip and 8GB of RAM (64bit Windows 7) and a very fast solid state disk. But Visual Studio (with resharper) seems to be killing it. Our solution does have about 130 projects in it. I thought with having 8GB and all I might try turning virtual memory off. When I do this, it asks for a reboot and I found its still on afterwards. So quite frankly I don't know how to do this. Anyway, I wonder why we still have VM in an age of super cheap real RAM. I think various things like memory mapped files use it behind the scenes, but otherwise can't see the purpose. Interested in opinions here or a definitive answer. Paging file is 8GB. What would happen if I went up to 16GB [of RAM]? How can I make this thing faster?
Regards, Rob Philpott.
Call it virtual memory, paging, or whatever else; but there ought to be a way to prevent the OS from using disk space to imitate RAM. It's really disingenuous to argue that this is not possible, especially with 8GB of RAM. Maybe Linux is better at this...
-
Call it virtual memory, paging, or whatever else; but there ought to be a way to prevent the OS from using disk space to imitate RAM. It's really disingenuous to argue that this is not possible, especially with 8GB of RAM. Maybe Linux is better at this...
-
I started a new job recently and took with me what I thought was a reasonably high-spec machine running an AMD 4 core chip and 8GB of RAM (64bit Windows 7) and a very fast solid state disk. But Visual Studio (with resharper) seems to be killing it. Our solution does have about 130 projects in it. I thought with having 8GB and all I might try turning virtual memory off. When I do this, it asks for a reboot and I found its still on afterwards. So quite frankly I don't know how to do this. Anyway, I wonder why we still have VM in an age of super cheap real RAM. I think various things like memory mapped files use it behind the scenes, but otherwise can't see the purpose. Interested in opinions here or a definitive answer. Paging file is 8GB. What would happen if I went up to 16GB [of RAM]? How can I make this thing faster?
Regards, Rob Philpott.
Both Visual Studio in general and Resharper in particular are notorious memory hogs, so it's possible that they have eaten the whole thing. Alternatively, perhaps the slowness is not memory related? Resharper probably does lots of project scanning and it might just be CPU blocked. Are you sure that memory allocation is the problem? You can almost certainly make things much faster by (i) not using VS and (ii) not using Resharper, heh.
-
Call it virtual memory, paging, or whatever else; but there ought to be a way to prevent the OS from using disk space to imitate RAM. It's really disingenuous to argue that this is not possible, especially with 8GB of RAM. Maybe Linux is better at this...
What the hell, dude?
_beauw_ wrote:
Call it virtual memory, paging, or whatever else
Yeah, that would be okay if this was a forum for car enthusiasts, but since it is for developers it is important to know the difference.
_beauw_ wrote:
It's really disingenuous to argue that this is not possible
Nobody suggested it is not possible to turn off page file, quite the opposite. It's just that he didn't do it properly.
-
Windows only uses the page file if the whole of normal memory is allocated, so there is an alternative, but it's 'out of memory' error messages, which most people would say is worse.
-
I started a new job recently and took with me what I thought was a reasonably high-spec machine running an AMD 4 core chip and 8GB of RAM (64bit Windows 7) and a very fast solid state disk. But Visual Studio (with resharper) seems to be killing it. Our solution does have about 130 projects in it. I thought with having 8GB and all I might try turning virtual memory off. When I do this, it asks for a reboot and I found its still on afterwards. So quite frankly I don't know how to do this. Anyway, I wonder why we still have VM in an age of super cheap real RAM. I think various things like memory mapped files use it behind the scenes, but otherwise can't see the purpose. Interested in opinions here or a definitive answer. Paging file is 8GB. What would happen if I went up to 16GB [of RAM]? How can I make this thing faster?
Regards, Rob Philpott.
I was running Resharper against a similarly sized solution recently but had to uninstall it as it was impacting on performance too heavily (45 seconds for a context menu in code editor, although my machine is less powerful than yours). One of the developers on my team still uses Resharper but has turned off automatic code scanning and this make performance more reasonable. Have you looked in task manager to see how much memory VS and Resharper are taking up? Could you change the drive for your VM to the SSD? I suspect that the problem is that Resharper is hogging the CPU rather than it being a memory problem but might be worth a try...
Sarchasm : The gulf between the author of sarcastic wit and the person who doesn't get it.
-
Both Visual Studio in general and Resharper in particular are notorious memory hogs, so it's possible that they have eaten the whole thing. Alternatively, perhaps the slowness is not memory related? Resharper probably does lots of project scanning and it might just be CPU blocked. Are you sure that memory allocation is the problem? You can almost certainly make things much faster by (i) not using VS and (ii) not using Resharper, heh.
I noticed a big jump in memory utilization when I upgraded to VS2008. At the time, I had created some WPF projects in VS2005. It was necessary to install some extra things (CTP?) to do WPF in VS2005, but I installed them and memory usage was still reasonable. When I later converted these projects to VS2008, with its built-in WPF support, memory usage by the IDE grew by a factor of 2-4 times. This might be due to some decision to re-write parts of the IDE and toolsuite in .NET; I seem to recall that one of Microsoft's marketing claims at the time was that big parts of Visual Studio had begun using .NET code.
-
I started a new job recently and took with me what I thought was a reasonably high-spec machine running an AMD 4 core chip and 8GB of RAM (64bit Windows 7) and a very fast solid state disk. But Visual Studio (with resharper) seems to be killing it. Our solution does have about 130 projects in it. I thought with having 8GB and all I might try turning virtual memory off. When I do this, it asks for a reboot and I found its still on afterwards. So quite frankly I don't know how to do this. Anyway, I wonder why we still have VM in an age of super cheap real RAM. I think various things like memory mapped files use it behind the scenes, but otherwise can't see the purpose. Interested in opinions here or a definitive answer. Paging file is 8GB. What would happen if I went up to 16GB [of RAM]? How can I make this thing faster?
Regards, Rob Philpott.
it's almost never a good ideea to disable the swap file. if you have plenty of ram you could set it to something lower like 4gig in your case (if you are space limited). look in resource monitor at the mem usage of visual studio. having 8gigs of ram should be a good start, the fast ssd definitely helps. if you have 4 cores then i do not see how visual studio kills the machine. usually resharper (i use 5.1) does its scanning at the begining, builds a cache (hogging the cpu for a while) and then it's quite idle. the cache is reused after ide/os restarts. careful not to delete the resharper cache as it will have to rebuild it. also do not go crazy on registry/os cleanners/optimizers etc. also if you have automaticly generated code that is large then you can also exclude that from the analysys. other than that resharper is priceless. take a look at the antivirus you are using as some are renouned to be hogging the cpu. if needed disable live scanning of the projects folder and/or ide process.
-
I started a new job recently and took with me what I thought was a reasonably high-spec machine running an AMD 4 core chip and 8GB of RAM (64bit Windows 7) and a very fast solid state disk. But Visual Studio (with resharper) seems to be killing it. Our solution does have about 130 projects in it. I thought with having 8GB and all I might try turning virtual memory off. When I do this, it asks for a reboot and I found its still on afterwards. So quite frankly I don't know how to do this. Anyway, I wonder why we still have VM in an age of super cheap real RAM. I think various things like memory mapped files use it behind the scenes, but otherwise can't see the purpose. Interested in opinions here or a definitive answer. Paging file is 8GB. What would happen if I went up to 16GB [of RAM]? How can I make this thing faster?
Regards, Rob Philpott.
Hi Check Out the Resharper Forum , you are not alone. There has been a heated debate about performance (by me at least) since 6.0 was released , they released 6.1 to overcome some of these , a specific issue with writing and processing files. I have a i7 Quad / SSD / BUT Win 32 and 4Gb . There is nothing I can do about this as its an "Issue Machine" by my employers . BUT Why should I have to , its not a bad spec. I code for about and hour and eventually get a Out Of Memory error and VS 2010 crashes . I have had to uninstall R# . I have reverted to using Visual Assist X as a much lower demand add in . BUT a much lower functionality to go with it. I firmly believe that R# has simply got too big and now really demands a 64 Bit PC and Loads of RAM if its to function at all . This is sad since comapred to all the add ins out there its streets ahead in the way in blends into VS. The Love Hate relationship continues. What is really sad is that users like me sit with a "redundant" product . I can use it but it means restarting VS every hour or so to clear out memory, hardly ideal. Even on small projects I see 300 Mb DevEnv.exe usage in Task Manager climb to 700- 800 Mb within an hour. Even sadder is Jet Brains are remarkably quiet on the subject. Mike
Mike
-
Windows only uses the page file if the whole of normal memory is allocated, so there is an alternative, but it's 'out of memory' error messages, which most people would say is worse.
That's not true -- Windows will swap stuff out in order to make space for its disk cache, which it grows if you're doing a lot of IO. Some would say this is good, but I find the disk cache algorithm is actually less accurate at predicting future hits than "I loaded this program so I'm likely to use its memory again". In Linux, you can disable this behaviour with 'echo 0 > /proc/sys/vm/swappiness'; I don't know if there's a similar control for Windows.