Bug 28511 - Bitmap font embedded in TTF causes massive X server CPU usage
Summary: Bitmap font embedded in TTF causes massive X server CPU usage
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-11 15:58 UTC by Chris Lee
Modified: 2018-12-13 22:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lee 2010-06-11 15:58:57 UTC
Steps to reproduce:
1. Install the Anonymous Pro font (yum install msimonson-anonymouspro-fonts on F13, or download+install manually from http://www.ms-studio.com/FontSales/anonymouspro.html )
2. Set GNOME terminal font to Anonymous Pro, size 8pt (assuming X server DPI is set to 96)
3. In a GNOME-terminal window, run a program that spews a lot of text; an example Python script which will do the job is available at http://pastie.org/private/dmzqrytvjdhle597muzufw

Expected result:
Spewing dozens of lines of text per second should causes barely any noticeable extra CPU overhead.

Actual result:
My X server's CPU usage jumps to well over 70% and according to sysprof most of my CPU time is being spent inside drm_gem_object_alloc, which is being called by radeon_gem_object_create.
Comment 1 Chris Lee 2011-06-13 22:39:43 UTC
Still seeing this bug on Fedora 15 (xserver 1.10.1, ATI driver 6.14.1/git-a6d2dba6).
Comment 2 Michel Dänzer 2011-06-21 02:23:00 UTC
(In reply to comment #2)
> My X server's CPU usage jumps to well over 70% and according to sysprof most of
> my CPU time is being spent inside drm_gem_object_alloc, which is being called
> by radeon_gem_object_create.

Can you attach a sysprof profile?
Comment 3 Chris Lee 2012-02-03 21:35:36 UTC
Sysprof profile is available at http://mg8.org/tmp/bug-28511.sysprof. Taken from a Debian wheezy system running xserver-xorg 1.11.4 RC 1, xserver-xorg-video-radeon 1:6.14.3-2, running on Linux 3.1.0-1-amd64. The xserver CPU usage still spikes to 100% on at least one of my cores.
Comment 4 Michel Dänzer 2012-02-08 03:34:17 UTC
Can you get another one with the xserver-xorg-core-dbg, xserver-xorg-video-radeon-dbg and libdrm2-dbg packages installed?
Comment 5 Chris Lee 2012-02-08 21:18:23 UTC
Uploaded to http://mg8.org/tmp/bug-28511.2.sysprof
Comment 6 Michel Dänzer 2012-02-09 02:19:06 UTC
According to Chris on IRC, this also happens with a recent intel driver, so it's probably an issue in code used with both drivers.

Running the referenced python script, the main difference I notice between the Anonymous Pro and DejaVu Sans Mono fonts is that with the former, the X server uses more CPU than gnome-terminal (similar to the referenced profiles), while with the latter it's the other way around.

However, I'm not sure how the font could make any direct difference on the server side; it's just glyphs there? So, maybe the Anonymous Pro font causes gnome-terminal / VTE / Cairo / Xft / ... to use a different, less efficient method for drawing the text? E.g. drawing fewer characters per call.

BTW, the latest profile is still mostly unusable, possibly due to known issues with sysprof on 64 bit.
Comment 7 GitLab Migration User 2018-12-13 22:23:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/400.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.