Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 02-13-09, 12:21 PM   #13
miseiler
Registered User
 
Join Date: Aug 2008
Posts: 25
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

EDIT: nm

Last edited by miseiler; 02-22-09 at 01:31 PM.
miseiler is offline   Reply With Quote
Old 02-22-09, 11:10 AM   #14
Thunderbird
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

Hopefully some more people who have this issue can join this thread, so that this issue can be fixed. Sure in Wine we have virtual memory issues but there are also bugs in the Nvidia drivers and the fix we have for Wine also causes major slowdowns on Nvidia hardware.

The main bug is http://bugs.winehq.org/show_bug.cgi?id=13335. In short Wine needs to emulate the win32 memory layout and as part of that we reserve big amounts of virtual memory. We only leave ~300MB or so of virtual memory left for native linux libraries like libGL.so. This isn't nice and this can cause major issues in games which are very memory hungry. This issue has been around for some years but these days it is causing major issues. On ATI drivers the issue was worse and most of the time 3d didn't work at all.

The fix we have is to override malloc-like calls and provide apps with memory which was preallocated by Wine (so we give libGL win32 memory). A patch which does this is attached to bug 13335 but it causes major slowdowns on some 64bit systems. It works fine on 32-bit kernels. The systems which are affected use a 64-bit kernel with 4gb ram.
Thunderbird is offline   Reply With Quote
Old 02-22-09, 11:17 AM   #15
miseiler
Registered User
 
Join Date: Aug 2008
Posts: 25
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

EDIT: 64-bit 3D apps don't have this problem, see further in the thread.
miseiler is offline   Reply With Quote
Old 02-22-09, 11:40 AM   #16
kgbricola
Registered User
 
Join Date: Feb 2009
Posts: 7
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

I just compiled the glxgears ( http://cvsweb.xfree86.org/cvsweb/xc/...ears.c?rev=1.3 ) as 32bit version and as 64bit version. The 64bit version runs flawlessly on my F10 64bit (Linux ricola 2.6.27.15-170.2.24.fc10.x86_64 #1 SMP Wed Feb 11 23:14:31 EST 2009 x86_64 x86_64 x86_64 GNU/Linux).

But the 32bit version (compiled with gcc -m32 option) allocates a lot of memory (easily visible with top) until it crashes (at 4GB). Tested with nvidia driver 180.29.

So I guess it's not only wine's fault. Could someone confirm my test case?

If I should attach additional information, please say so. But I guess all attached files from previous posters should have the informations which are needed.
kgbricola is offline   Reply With Quote
Old 02-22-09, 12:03 PM   #17
miseiler
Registered User
 
Join Date: Aug 2008
Posts: 25
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

WOW. I attached a screenshot of this in action.

As you can see, the VIRT memory got to 4093M, and then boom...fps drops to a tiny fraction of its previous amount.

EDIT: Don't worry about the FPS being slow before it jumps, that's me turning off VSYNC so memory fills up more quickly.
Attached Thumbnails
Click image for larger version

Name:	2009-02-22-115810_1680x1050_scrot.jpg
Views:	296
Size:	103.1 KB
ID:	35631  
miseiler is offline   Reply With Quote
Old 02-23-09, 11:32 PM   #18
darksorceror
VIVO wanter
 
Join Date: May 2007
Posts: 6
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

Looks to me like the slow-down occurs when the application tries to allocate more than 4GB RAM. This is because 4GB fits nicely in to 32bit. Once the 32bit limit is exceeded, some type of paging or swapping will be required to prevent the app from crashing instantly.

As someone mentioned previously, a 64bit application won't have a problem. Or at least, not unless you have 16 exabytes of RAM.

This begs the question, why so much RAM for the 32bit apps? Unfortunately, I don't have any suggestions other than a memory-leaking bug in the 32bit GL/GLU/GLX libraries.

I'm also wondering if ulimit might help here.
darksorceror is offline   Reply With Quote
Old 02-24-09, 12:09 AM   #19
miseiler
Registered User
 
Join Date: Aug 2008
Posts: 25
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

Quote:
Originally Posted by darksorceror View Post
Looks to me like the slow-down occurs when the application tries to allocate more than 4GB RAM. This is because 4GB fits nicely in to 32bit. Once the 32bit limit is exceeded, some type of paging or swapping will be required to prevent the app from crashing instantly.

As someone mentioned previously, a 64bit application won't have a problem. Or at least, not unless you have 16 exabytes of RAM.

This begs the question, why so much RAM for the 32bit apps? Unfortunately, I don't have any suggestions other than a memory-leaking bug in the 32bit GL/GLU/GLX libraries.

I'm also wondering if ulimit might help here.
Ye...esss...kinda! Ok.

Very limited testing here, can't stay... but I just set ulimit to 20000000 (1GB?) and glxgears went and filled 3G of memory, then stopped. Performance dropped a tad but NOT the whole way.

EDIT: Tried a couple more...10000 and 400000000, same behaviour

EDIT2: But calling "ulimit -f 20000000" in my steam executable does nothing; if anything, CS is worse.
miseiler is offline   Reply With Quote
Old 02-24-09, 03:34 AM   #20
firewalker
Registered User
 
Join Date: Mar 2005
Location: Ellas
Posts: 32
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

Did some testing.

Setting the nvidia kernel module option

Code:
  NVreg_RemapLimit=0x3C00000
Correction: doesn't help...

How I reproduce the BUG :
  1. Run WorldOfGoo demo
  2. Play a little
  3. Make it open the browser window (e.g. click a chapter not included in the demo)

Results : Cannot terminate (-15) or kill (-9) the game, kernel BUG is raised.

Attached the nvidia bug report *without* NVreg_RemapLimit setting
Attached Files
File Type: gz nvidia-bug-report.log.gz (31.3 KB, 109 views)

Last edited by firewalker; 02-25-09 at 09:37 AM.
firewalker is offline   Reply With Quote

Old 02-24-09, 07:31 AM   #21
miseiler
Registered User
 
Join Date: Aug 2008
Posts: 25
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

Quote:
Originally Posted by firewalker View Post
Setting the nvidia kernel module option

Code:
  NVreg_RemapLimit=0x3C00000
seems to help, e.g. can't reproduce the BUG.
I can't reproduce your results in 32-bit glxgears or wine. Still chews up 4G and breaks.
miseiler is offline   Reply With Quote
Old 02-25-09, 01:29 PM   #22
niczar
Registered User
 
Join Date: Oct 2007
Posts: 12
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

This seems quite a simple bug to reproduce, has anyone at nVidia noticed? I can duplicate it any time.

See my thread there: http://www.nvnews.net/vbulletin/showthread.php?t=128737
niczar is offline   Reply With Quote
Old 02-26-09, 03:39 AM   #23
netarchy
Registered User
 
netarchy's Avatar
 
Join Date: Jul 2003
Location: San Antonio, TX
Posts: 19
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

Your mileage may vary, but I had this same issue, and going back to the 180.22 drivers seems to have resolved the issue.

Oddly enough, the issue is present on every other driver version I've tried, which includes 177.82 , 180.27, 180.29, and 180.35 (among other issues on 180.35), but 180.22 seems to be fine for me.

Tested on vanilla 2.6.28, and 2.6.29-rc6

EDIT: Spoke too soon, the memory consumption rate was a bit slower, but still definitely present.

Last edited by netarchy; 03-06-09 at 08:49 PM.
netarchy is offline   Reply With Quote
Old 02-26-09, 09:29 AM   #24
miseiler
Registered User
 
Join Date: Aug 2008
Posts: 25
Default Re: Huge slowdown after 2 min in 3D games with >3GB RAM and Memory Remap Enabled

The best one for me is 177.82. All the 180.X drivers are horrible for this bug on my machine.

I shouldn't have to mention it, but 180.35 didn't fix anything.
miseiler is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:40 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.