Bug 22171 - DRM is leaving large amount of allocated cached unused object left in memory
Summary: DRM is leaving large amount of allocated cached unused object left in memory
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Carl Worth
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-09 06:46 UTC by Zdenek Kabelac
Modified: 2017-07-24 23:10 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Zdenek Kabelac 2009-06-09 06:46:41 UTC
When I keep my laptop running over couple days - I start to see a steadily growing amount of drm objects occupying my 4GB ram to the point when it starts to be ridiculous and starts to be limiting speed of my machine.

I admit that I'm running Firefox with large amount of tabs - which is most probably responsible for allocating these resources, but when I restart the firefox the memory is not actually being released in from DRM objects.

Here are some stats from /proc

15318 objects
797159424 object bytes
4 pinned
8589312 pin bytes
248541184 gtt bytes
260575232 gtt total


And I've noticed over  300 objects with size ~1163560 (via lsof /drm mm object)
So actually OOM killed my Firefox - but major memory takes via associated drm object was not released)

From the source code it seems that current logic is - once allocated memory is used forever - I think some better approach should be used here - and keep only certain amount of preallocated objects - eventually release unused object after 5 minutes or something like this.

xorg-x11-server-Xorg-1.6.1.901-1.fc11.x86_64
libdrm-2.4.6-7.fc11.x86_64
kernel: 2.6.30-rc7
Comment 1 Zdenek Kabelac 2009-07-02 02:53:08 UTC
I should probably append, that after 13 days of usage, the memory size went to 1.3GB of memory permanently allocated in RAM before Xserver crashed with some fault. The usage of ~1.3GB was there for 2 days - so the memory grow has somewhat slowed at this point.
Comment 2 Antonio Petrelli 2009-07-02 03:15:58 UTC
People @ Ubuntu are suffering a similar problem in the released version:

https://bugs.launchpad.net/ubuntu/+bug/353800

Kubuntu Jaunty currently uses:

Xorg 1.6.0
libdrm 2.4.5
kernel 2.6.28
Comment 3 Chris Wilson 2009-12-02 11:46:23 UTC
We have implemented two methods to cap the size of the object cache. In the kernel we have implement a shrinker that can reap unused objects under memory pressure, and in userspace we throw out objects that are older than 1 second.


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.