Opera, memory usage and the working set
Monday, 6. March 2006, 14:04:17
There's a commom misconception that the working set of an application, as seen in the task manager, is the amount of physical memory the application is using. This is not entirely correct.
The working set actually tells you how many virtual pages in the process are mapped into physical memory.
What the OS will do, when an application such as Opera is using external DLLs or even other parts of opera.dll, is to map that part of the dll into the virtual address space of Opera. The actual memory used will not increase, only the working set.
To use an example for the technical people out there:
The result you will find is that the working set from #5 is double the working set from #4. However, the OS isn't using any more physical memory in #5 then in #4. So #5 will show as twice the memory used in the task manager, but in reality, there is very little difference in the physical memory used!
Now, if you minimize Opera, you will see that the memory used in task manager will decrease significantly. This is because the working set is freed by the OS.
Another thing worth noting is that plugins will add to the working set of Opera, some in a significant way.
I hope this clears up some points.
The working set actually tells you how many virtual pages in the process are mapped into physical memory.
What the OS will do, when an application such as Opera is using external DLLs or even other parts of opera.dll, is to map that part of the dll into the virtual address space of Opera. The actual memory used will not increase, only the working set.
To use an example for the technical people out there:
- Open a file
- Call CreateFileMapping to create a mapping handle
- Call MapViewOfFile twice to create two different identical views on the same file
- Try looping through just one of the views and look at what that does to your process' working set
- Now try looping through both views and look at what that does to your process' working set
The result you will find is that the working set from #5 is double the working set from #4. However, the OS isn't using any more physical memory in #5 then in #4. So #5 will show as twice the memory used in the task manager, but in reality, there is very little difference in the physical memory used!
Now, if you minimize Opera, you will see that the memory used in task manager will decrease significantly. This is because the working set is freed by the OS.
Another thing worth noting is that plugins will add to the working set of Opera, some in a significant way.
I hope this clears up some points.
By gun, # 6. March 2006, 18:23:47
But then how to find out the actual memory consumption of a process?
By chesss, # 7. March 2006, 08:42:56
By mitchman2, # 7. March 2006, 10:09:43
I have 1GB RAM. 92,920K private bytes, 436,056 Virtual Size, 61,840 Working set.
Can someone lead me through this?
By jp10558, # 7. March 2006, 15:51:10
By mitchman2, # 7. March 2006, 18:02:13
By mitchman2, # 9. March 2006, 10:53:37
So how is it actually?
By shogunu, # 11. March 2006, 18:29:59
Better use process explorer
By mitchman2, # 12. March 2006, 18:20:22
Private bytes: 86mb
virtual bytes: 187mb
working sets: 24mb
System memory:256mb, Opera is minimized
By chesss, # 13. March 2006, 21:49:30
http://shsc.info/WindowsMemoryManagement
- for anyone interested to know how all this works(its a lot more complicated than I ever thought), or just interested in getting a headache or just to get throughly confused.
By chesss, # 13. March 2006, 22:02:40
eXtended Task Manager (XTM) is a powerful auxiliary tool designed for simplifying the environment of the software developer. XTM is an extended windows task manager and performance monitoring tool for Microsoft Windows 2000 OS and later versions of Windows. XTM can give fast solutions for sudden problems which may arise in a product's functioning without having to either reinstall it from the user workstation or even without needing to close the application.
http://www.yaodownload.com/utilites/system-utilities/extended-task-manager/
By tony2006, # 20. April 2006, 02:27:37
By null-a, # 10. June 2006, 17:18:14
By dbw, # 22. July 2007, 23:51:23
By mitchman2, # 24. July 2007, 15:17:07
By DontGoHere, # 18. August 2007, 03:24:48
By mitchman2, # 20. August 2007, 22:40:17
Sorry to have just repeated myself, but I explained this to someone else and the first E-mail back suggested I close Opera and reopened it ............ Been there, done that and got the tee shirt.
The next question back from support was about the version, so here is my set-up:
Version information
Version: 9.24
Build: 8816
Platform: Win32
System: Windows XP
Java: Sun Java Runtime Environment version 1.6
XHTML+Voice; IBM Multimodal Runtime Environment, Version: 4.1.3, Build: 20050506.01.1
By ebulfin, # 14. December 2007, 11:57:57
By mitchman2, # 17. December 2007, 14:02:57
but why does the memory usage keeps on increasing with the hour os usage??
By naveen_reloaded, # 30. December 2007, 09:02:55
Thank you for the tip in the comments to change the memory cache setting. I changed it from automatic to 60MB, the largest available. Opera is now holding steady at ~250MB. I don't mind as long as I know where the memory is going. For comparison Firefox is usually the same or higher.
Thanks for the post. BTW... using opera 9.25
By cmawhorter, # 22. January 2008, 11:16:47
By sbruce45, # 30. May 2008, 12:33:12
Thanks for pointing out to Tools->Preferences->Advanced->History. I had forgotten about it and Opera was going real slow on my system. Now I have optimized the settings and its a breeze as before. Much appreciated.
By moserw, # 17. July 2008, 17:40:44