Wine memory problem

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
sumo
Level 2
Level 2
Posts: 13
Joined: Thu Apr 24, 2008 2:07 am

Wine memory problem

Post by sumo »

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?
Jim
Level 2
Level 2
Posts: 48
Joined: Mon Feb 25, 2008 6:09 pm

Re: Wine memory problem

Post by Jim »

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.
jeffz
Level 5
Level 5
Posts: 345
Joined: Thu Mar 13, 2008 10:03 pm

Re: Wine memory problem

Post by jeffz »

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.
sumo
Level 2
Level 2
Posts: 13
Joined: Thu Apr 24, 2008 2:07 am

Re: Wine memory problem

Post by sumo »

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?
sumo
Level 2
Level 2
Posts: 13
Joined: Thu Apr 24, 2008 2:07 am

Re: Wine memory problem

Post by sumo »

Jim wrote: 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.
Resident memory usage for my program + wine- 500 MB
Virtual memory usage for my program + wine - 3.6GB
jeffz
Level 5
Level 5
Posts: 345
Joined: Thu Mar 13, 2008 10:03 pm

Post by jeffz »

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.
sumo
Level 2
Level 2
Posts: 13
Joined: Thu Apr 24, 2008 2:07 am

Post by sumo »

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? (I use the multiuser systems with the resources control)
Evil Jay

Wine memory problem

Post by Evil Jay »

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.
Evil Jay

Wine memory problem

Post by Evil Jay »

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.
James McKenzie

Wine memory problem

Post by James McKenzie »

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?


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 McKenzie
Dan Kegel

Wine memory problem

Post by Dan Kegel »

On Fri, Apr 25, 2008 at 4:38 AM, sumo <[email protected]> wrote:
I understand you. Whether but it is possible to reduce quantity "reserved by the preloader" or to change it dynamically?
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?
Susan Cragin

Wine memory problem

Post by Susan Cragin »

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 McKenzie
I 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.
sumo
Level 2
Level 2
Posts: 13
Joined: Thu Apr 24, 2008 2:07 am

Re: Wine memory problem

Post by sumo »

Dan Kegel wrote:On Fri, Apr 25, 2008 at 4:38 AM, sumo <[email protected]> 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.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Wine memory problem

Post by vitamin »

sumo wrote:
Dan Kegel wrote:On Fri, Apr 25, 2008 at 4:38 AM, sumo <[email protected]> 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.
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.
sumo
Level 2
Level 2
Posts: 13
Joined: Thu Apr 24, 2008 2:07 am

Re: Wine memory problem

Post by sumo »

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!
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Wine memory problem

Post by vitamin »

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

Wine memory problem

Post by Dan Kegel »

On Fri, Apr 25, 2008 at 8:27 AM, sumo <[email protected]> wrote:
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.
You're not alone. Other people also use ulimit similarly (though not
with wine), e.g.
http://wiki.egee-see.org/index.php/How_ ... ion_on_WNs

It's a shame that ulimit doesn't offer a limit on
physical memory, which is what you really want, I bet.
But fear not, the kernel developers are on it! See

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/Rep ... eprint.pdf

That's the direction I would go if I were you. I don't know if this feature is
in mainline distributions yet, it's so new. Maybe Hardy.
What version of Linux are you on, and do you have control over the kernel?
- Dan
sumo
Level 2
Level 2
Posts: 13
Joined: Thu Apr 24, 2008 2:07 am

Re: Wine memory problem

Post by sumo »

sumo
Level 2
Level 2
Posts: 13
Joined: Thu Apr 24, 2008 2:07 am

Re: Wine memory problem

Post by sumo »

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?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Wine memory problem

Post by vitamin »

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.
sumo
Level 2
Level 2
Posts: 13
Joined: Thu Apr 24, 2008 2:07 am

Re: Wine memory problem

Post by sumo »

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

Wine memory problem

Post by Dan Kegel »

On Mon, Apr 28, 2008 at 1:14 AM, sumo <[email protected]> wrote:
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 has nothing to do with physical memory.
It's an address space reservation to keep Linux libraries
from stepping on addresses that Win32 apps need.

Stop looking at fixes for this in Wine, and start looking at
those kernel container features...
sumo
Level 2
Level 2
Posts: 13
Joined: Thu Apr 24, 2008 2:07 am

Re: Wine memory problem

Post by sumo »

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.

In the old versions of wine - winepreloader reserved memory too?
Dan Kegel

Wine memory problem

Post by Dan Kegel »

On Mon, Apr 28, 2008 at 6:26 AM, sumo <[email protected]> wrote:
Very good. How works preloader for servers with physical memory < 3GB?
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 need to correct source texts of wine to reduce by the my
risk quantity reserved virtual memories.
What files are necessary for modification?
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.
- Dan
sumo
Level 2
Level 2
Posts: 13
Joined: Thu Apr 24, 2008 2:07 am

Re: Wine memory problem

Post by sumo »

Dan Kegel wrote:On Mon, Apr 28, 2008 at 6:26 AM, sumo <[email protected]> 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 condition for wine preloader!
Thank's. I shall try to change the specified values
Locked