I have program which memory use 500MB for OS Windows, but this program + wine in OS Linux use 3.6 GB. 1 wine+ program process use 3.6 GB virtual memory. How to reduce quantity of used memory for 1 process?
sumo wrote:> I have program which memory use 500MB for OS Windows, but this program + wine in OS Linux use 3.6 GB. > 1 wine+ program process use 3.6 GB virtual memory. > How to reduce quantity of used memory for 1 process?Don't use that "1 process." That's about all the help one can give you with what little information you've provided. All I know is that you have some unspecified program which uses more memory than you think it should. Not much to go on.
sumo wrote:> I have program which memory use 500MB for OS Windows, but this program + wine in OS Linux use 3.6 GB. > 1 wine+ program process use 3.6 GB virtual memory. > How to reduce quantity of used memory for 1 process?It sounds like you might be confused about the actual memory usage. Look at the resident memory per process, not the virtual.
jeffz wrote:> > sumo wrote: > > I have program which memory use 500MB for OS Windows, but this program + wine in OS Linux use 3.6 GB. > > 1 wine+ program process use 3.6 GB virtual memory. > > How to reduce quantity of used memory for 1 process? > > > It sounds like you might be confused about the actual memory usage. Look at the resident memory per process, not the virtual.My program use 500 MB resident memory in Linux, but virtual memory use - 3.6GB! It is necessary for me to reduce virtually memory! Whether it is possible to make it?
jeffz wrote:> I still say you are confused. > > The large value you are seeing as virtual is simply a range of memory that has been reserved by the preloader so that some things can be loaded in specific ranges. > > No action is required.I understand you. Whether but it is possible to reduce quantity "reserved by the preloader" or to change it dynamically?
sumo wrote:> jeffz wrote: > >> I still say you are confused. >> >> The large value you are seeing as virtual is simply a range of memory that has been reserved by the preloader so that some things can be loaded in specific ranges. >> >> No action is required. >> > > > I understand you. Whether but it is possible to reduce quantity "reserved by the preloader" or to change it dynamically? > >Why would you want too? Virtual memory, if never referenced, never really exists anywhere (i.e. is not allocated in real resident RAM or in swap). If it is referenced, you want it to be there.
sumo wrote:> jeffz wrote: > >> I still say you are confused. >> >> The large value you are seeing as virtual is simply a range of memory that has been reserved by the preloader so that some things can be loaded in specific ranges. >> >> No action is required. >> > > > I understand you. Whether but it is possible to reduce quantity "reserved by the preloader" or to change it dynamically? > >Why would you want to? Virtual memory, if never referenced, never really exists anywhere (i.e. is not allocated in real resident RAM or in swap). If it is referenced, you want it to be there.
>Simple answer: No. Are you running out of disk space in the /tmp >partition? This is more a Linux setup problem than a Wine problem. >Virtual memory is usually used to store portions of code not needed and >is swapped into physical memory when needed. This may result in a >performance issue for some, but not all, programs. > >BTW, you did not answer Jeffz's question: What is the name of the >program you are running? You may find hints on how to make it run >better in the Applications Database (AppDb) portion of the Wine website. > >James McKenzieI got into this discussion late, but would like to mention that I run Dragon NaturallySpeaking in WINE on Ubuntu, and would do ANYTHING to make DNS run faster and jump higher. DNS is a terrible resource hog, and doesn't play nice with other programs, especially programs that use sound. I usually have only that program, OpenOffice and Notepad running. I have a speedy processor and 3GB RAM, but I want more speed.
Dan Kegel wrote:> On Fri, Apr 25, 2008 at 4:38 AM, sumo <wineforum-user at winehq.org> wrote: > No, and it doesn't matter. It is perfectly ok. Virtual memory costs > nothing until it's used; > just reserving it is utterly free and has no ill effect. Don't worry, be happy. > > Are you having some actual problem?Yes. i have actual problem - resource control for multiusers space. I use ulimit for restriction of virtual memory. If this memory is limited. my users cannot use wine.
sumo wrote:> > vitamin wrote: > > Then you should change that. Wine have to have that virtual memory. You can not limit Wine if you want it to work. > > In general setting limits on virtual memory is harmful and does not add any security whatsoever. > > > In some cases such control is necessary. The control over virtual memory is necessary to me!Then just simply you can not run Wine. As simple as that! If you can not understand that virtual memory is just that - a _VIRTUAL_ memory.
Dan Kegel wrote:> > You're not alone. Other people also use ulimit similarly (though not > with wine), e.g. > http://wiki.egee-see.org/index.php/How_to_limit_per-process_physical_memory_consumption_on_WNs > I > http://lkml.org/lkml/2008/2/25/124 > http://community.livejournal.com/openvz/21817.html > http://lwn.net/Articles/246320/ > https://ols2006.108.redhat.com/2007/Reprints/singh-Reprint.pdf > Danthank's for your links
sumo wrote:> I have program which memory use 500MB for OS Windows, but this program + wine in OS Linux use 3.6 GB. > 1 wine+ program process use 3.6 GB virtual memory. > How to reduce quantity of used memory for 1 process?May be to set smaller quantity of physical memory in /dll/kernel32/heap.c file? Then the quantity of virtual memory will change proportionally?
sumo wrote:> > sumo wrote: > > I have program which memory use 500MB for OS Windows, but this program + wine in OS Linux use 3.6 GB. > > 1 wine+ program process use 3.6 GB virtual memory. > > How to reduce quantity of used memory for 1 process? > > > May be to set smaller quantity of physical memory in /dll/kernel32/heap.c > file? Then the quantity of virtual memory will change proportionally?No. This is done in preloader as one of the first things. The reason preloader reserves all the memory (pretty much all of the lover 2GB) is to keep everything else [system libraries] out of it. If you change that - you risking of having some system library loaded in the middle of the address space that Wine have to use for windows application.
vitamin wrote:> > No. This is done in preloader as one of the first things. > The reason preloader reserves all the memory (pretty much all of the lover 2GB) is to keep everything else [system libraries] out of it. >Very good. How works preloader for servers with physical memory < 3GB? I need to correct source texts of wine to reduce by the my risk quantity reserved virtual memories. What files are necessary for modification?
Dan Kegel wrote:> > Stop looking at fixes for this in Wine, and start looking at > those kernel container features...I have a problem. I cannot change a kernel at present. These are my system requirements. I need only pure kernel Windows started through wine. Support of a sound, video and etc is not necessary to me.
Dan Kegel wrote:> On Mon, Apr 28, 2008 at 6:26 AM, sumo <wineforum-user at winehq.org> wrote: > The preloader has nothing to do with physical memory. > You still don't understand the difference between address space > reservation and physical memory allocation. > [I perfectly understand it. You write to me that this necessary operating for wine preloader! Thank's. I shall try to change the specified values
Dan Kegel wrote:> > If you really can't change your kernel, then you're somewhat > screwed. To find out how screwed, try commenting out the line > { (void *)0x7f000000, 0x02000000 }, /* top-down allocations + > shared heap */ > in loader/preloader.c. > - DanModification of this file has not brought results winepreloader still reserves memory adress up 3.6 GB What it is necessary to change?
Just another question to the memory. Is there a chance to get rid of the high memory useage. Some applications crash when the virtual memory is about 4096MB. Examples: Gothic3, 3DMark03 (in some cases). I think they crash because they are only 32bit and so they couldn't access the addresses over 4GB. Just for info the memory usage in 3DMark03: Mem: 8200992k total, 3747164k used, 4453828k free, 444436k buffers Swap: 1469908k total, 0k used, 1469908k free, 2042612k cached
Dan Kegel wrote:> > What high memory usage? > > We reserve lots of address space, but we don't use lots of memory. > > Please don't generalize. The fact that we reserve lots of address > space is not a bug. If you have a real problem with a real application, > please post a bug report. > - DanYeah, that's right, my example shows that. The memory usage is small. But why do applications crash when the VIRTUAL memory is about 4GB? For example: http://bugs.winehq.org/show_bug.cgi?id=10778