client-side font rendering very very slow in X.org xserver 1.5.3 w/r200: massive fetches from VRAM, why?

Michel Dänzer michel at daenzer.net
Sat Jan 31 06:58:43 PST 2009


On Fri, 2009-01-30 at 21:59 +0000, Nix wrote:
> On 30 Jan 2009, Michel Dänzer stated:
> >Trying current xf86-video-ati Git might be good, but my main suggestion
> >would be to try xserver Git server-1.6-branch with EXA.
> 
> OK. Do I need to upgrade Mesa or anything related at the same time? 
> (I'm currently on libdrm 2.4.1, Mesa a few commits past 7.2.0).

I think that should be fine; if anything 3D related breaks though, you
can always try upgrading to Mesa 7.3. :)


> >> X: fbFetch_a1             10.92
> >>    dixLookupPrivate       7.04
> >>    fbStore_a1             3.70
> >>    mmxCombineAddU         3.06
> >>    pixman_image_composite 2.58
> >
> > [...]
> >
> >> So it looks like we *are* doing huge numbers of fetches from VRAM,
> >> judging by the massive time spent in calls upon pixman's fbFetch().
> >
> > No, at least with EXA, fb*_a1 can't access video RAM directly, as the
> > EXA core currently never migrates pixmaps of bpp < 8 to video RAM.
> 
> This was a profile with XAA, not EXA. Here's a more comprehensive set of
> results [...]

Ah, so some of those hotspots might indeed be direct VRAM access. With
EXA, does it help if you run a compositing manager, even just xcompmgr
-a?


> I must say, looking at these crude benchmark results I'm wondering if
> this client-side font thing wasn't an appealing diversion. Yes, they're
> pretty, and more flexible than core fonts: but all of a sudden simply
> simply redrawing the screen has become so CPU-intensive that a screen
> scroller can peg the CPU without any real effort :(

The EXA glyph cache introduced in xserver 1.6 greatly improves rendering
of client side fonts - some people have reported in excess of 5 million
glyphs/s on beefy Radeons. Unfortunately there are still a couple of
cases it doesn't support well in xserver 1.6, hopefully we can fix those
for 1.7.


> > To avoid a1 pictures, you could try using anti-aliasing everywhere, i.e.
> > don't choose any bitmap fonts and don't disable anti-aliasing for small
> > font sizes.
> 
> The benchmarks show that this would indeed speed things up. It would
> also eliminate every font I use day-to-day and give me piercing
> headaches. No thanks, let's find another way. :)

I think a big part of the motivation for client side fonts was indeed
anti-aliasing, so if you don't want AA and core fonts are faster for
you, just use core fonts?


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer



More information about the xorg mailing list