destopcouch memory consumption jumped between 0.6.1 and 0.6.2

Bug #534171 reported by Ken VanDine
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
desktopcouch
Fix Released
Medium
Chad Miller
desktopcouch (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: desktopcouch

desktopcouch.records.server has ballooned since 0.6.1. Just with a simple call to CouchDatabase, here is a test case with the RSS sizes inline:

desktopcouch 0.6.1-0ubuntu1
ipython
#RSS = 12468
from desktopcouch.records.server import CouchDatabase
#RSS = 16012
messages = CouchDatabase("gwibber_messages", create=True)
#RSS = 16500

desktopcouch 0.6.2-0ubuntu3
ipython
#RSS = 12468
from desktopcouch.records.server import CouchDatabase
#RSS = 17132
messages = CouchDatabase("gwibber_messages", create=True)
#RSS = 71436

Changed in desktopcouch:
assignee: nobody → Chad Miller (cmiller)
importance: Undecided → Medium
Revision history for this message
Chad Miller (cmiller) wrote :
Revision history for this message
Chad Miller (cmiller) wrote :

The only change I see that looks significant between the 0.6.1 and 0.6.2 tarballs is the import of "dbus" python module. That would consume memory on first usage, but not on subsequent CouchDatabase object instances.

However, if Gwibber is using DBus already, this would not be a difference between the two versions of desktopcouch, since it's already imported.

My plot above is Resident Memory Size relative to the *number of CouchDatabase instances* (not number of records in a database, as my label implies) appended to a list. References are alive and so no CouchDatabase instances are freed.

>>> l = list()
>>> l.append(CouchDatabase("gwibber_messages", create=True)) # and now check RSS
>>> l.append(CouchDatabase("gwibber_messages", create=True)) # and now check RSS
>>> l.append(CouchDatabase("gwibber_messages", create=True)) # and now check RSS
>>> l.append(CouchDatabase("gwibber_messages", create=True)) # and now check RSS
>>> l.append(CouchDatabase("gwibber_messages", create=True)) # and now check RSS
....

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Looks like the culprit is the report_changes call in CouchDatabaseBase, in desktopcouch/records/server_base.py

I added a return False at the beginning of that method and the RSS only went up 490K this time and it returned very fast. The same call before was taking over 4 seconds.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package desktopcouch - 0.6.3-0ubuntu2

---------------
desktopcouch (0.6.3-0ubuntu2) lucid; urgency=low

  * debian/patches/lp_534171.patch
    - Don't parse all the _changes feed; work out update_seq from the DB info,
       so we never request the whole feed, which is doom when the whole feed is
       large. (LP: #534171)
 -- Ken VanDine <email address hidden> Mon, 29 Mar 2010 21:24:15 -0400

Changed in desktopcouch (Ubuntu):
status: New → Fix Released
Chad Miller (cmiller)
Changed in desktopcouch:
status: New → Fix Committed
Changed in desktopcouch (Ubuntu):
milestone: none → ubuntu-10.04
Chad Miller (cmiller)
Changed in desktopcouch:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.