From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: Extreme memory usage when running USDX with Intel driver Date: Tue, 04 May 2010 09:19:29 -0700 Message-ID: <87zl0fljvy.fsf@pollan.anholt.net> References: <201005040119.08034.tobias.doerffel@gmail.com> <87r5lstq53.fsf@pollan.anholt.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0085895462==" Return-path: In-Reply-To: <87r5lstq53.fsf@pollan.anholt.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Tobias Doerffel , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0085895462== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 03 May 2010 18:24:56 -0700, Eric Anholt wrote: > On Tue, 4 May 2010 01:19:01 +0200, Tobias Doerffel wrote: > > Hi, > >=20 > > I have serious problems with running UltraStar Deluxe (a free OpenGL-ba= sed > > karaoke program) on an Intel graphic card (945GME). When starting the p= rogram, > > the system starts to use more than 1,5 GB of RAM for (I guess) GEM stuf= f. I=20 > > can't blame the program as it's running fine with both swrast (on the s= ame=20 > > computer and setup) and the nouveau driver on another computer and itse= lf=20 > > consumes about 100 MB of RAM. > >=20 > > I collected some data describing the system status after the program ha= s been=20 > > started up (and switched to tty0 in order to get these values). > >=20 > > With Mesa 7.9 /proc/dri/0/gem_object tells me > >=20 > > 8996 objects > > -1422700544 object bytes > > 3 pinned > > 19365888 pin bytes > > 140005376 gtt bytes > > 260308992 gtt total > >=20 > > With Mesa 7.8.1 it looks like the following: > >=20 > > 2655 objects > > -1792622592 object bytes > > 3 pinned > > 19365888 pin bytes > > 233402368 gtt bytes > > 260308992 gtt total > >=20 > > At the same time /proc//smaps has about 2500 similiar entries look= ing=20 > > like > >=20 > > 1007e000-1017e000 rw-s 20ac0e000 00:05 314 /dev/dri/card0 > > Size: 1024 kB > > Rss: 0 kB > > Pss: 0 kB > > Shared_Clean: 0 kB > > Shared_Dirty: 0 kB > > Private_Clean: 0 kB > > Private_Dirty: 0 kB > > Referenced: 0 kB > > Swap: 0 kB > > KernelPageSize: 4 kB > > MMUPageSize: 4 kB > >=20 > >=20 > > /proc/dri/0/gem_names contains > >=20 > > name size handles refcount > > name 1 size 4194304 > > 1 4194304 2 5 > > name 2 size 4194304 > > 2 4194304 2 4 > > name 3 size 16777216 > > 3 16777216 1 4 > >=20 > >=20 > > My setup is the latest kernel with latest commits from the drm-intel-ne= xt=20 > > branch. Same for xf86-video-intel and libdrm (both compiled from Git). = XServer=20 > > version is 1.8. Mesa as written above. What could I do further to track= down=20 > > the problem? > >=20 > > From what I saw in the source code, the program creates lots of texture= s for > > individual glyphs of fonts. The extreme memory usage seems to start whi= le the=20 > > several thousands of textures are being created. I'm just wondering tha= t=20 > > everything works fine with other drivers. >=20 > Yeah, we've got a few reports of some apps that have spectacularly large > memory usage, some to the point of OOMing. It hasn't been clear yet > that these are leaks or just overallocation, as they've all been in > relatively sizeable apps like Blender. Unfortunately, we don't have any > details yet on what it is special that these apps do. >=20 > Your note about glyphs is interesting, and may be useful. Right now we > tile any texture that comes our way. If the app is generating many tiny > textures for glyphs, the tiling may increase the pitch by up to a factor > of 8. You could test if this was the problem by setting > texture_tiling=3Dfalse in driconf. If that's the case, we can just tune > when we tile textures according to their size, and fix the problem. It's also an environment variable. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkvgSREACgkQHUdvYGzw6vcAEwCfSwPX5jB3IwkWlYhfkH0cCUw6 e2cAn28FW0C/0+Qeb0kcTlCZOxoWcGuC =qA/+ -----END PGP SIGNATURE----- --=-=-=-- --===============0085895462== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0085895462==--