#8128 BLOC 9.1.0: Excessive memory usage must be investigated

Zarro Boogs per Child bugtracker at laptop.org
Sun Sep 21 21:29:24 EDT 2008


#8128: Excessive memory usage must be investigated
-------------------------+--------------------------------------------------
   Reporter:  ypod       |       Owner:  ypod         
       Type:  defect     |      Status:  closed       
   Priority:  blocker    |   Milestone:  9.1.0        
  Component:  cerebro    |     Version:  not specified
 Resolution:  wontfix    |    Keywords:               
Next_action:  never set  |    Verified:  0            
  Blockedby:             |    Blocking:               
-------------------------+--------------------------------------------------
Changes (by ypod):

  * status:  new => closed
  * resolution:  => wontfix


Comment:

 I did the following as a basic test for memory usage of various python
 modules. I did the test on my computer, a 32-bit Centrino laptop running
 ubuntu.

 Let's start with the following code:
 {{{
  import gobject
  mainloop = gobject.MainLoop()
  mainloop.run()
 }}}
 Cost: 1.2MB of memory (1.2MB total)


 Add a dummy class, like the following:
 {{{
  import dbus
  import dbus.service
  class Dummy(dbus.service.Object):
     pass
 }}}


 Additional cost: 0.9MB of memory (2.1MB total)


 Importing some more modules, like the following:
 {{{
  import time, sys, os, traceback
  from select import select     from socket import *
  from random import random
  from struct import pack, unpack
  from optparse import OptionParser
  from os.path import basename
 }}}


 Additional cost: 1.0MB of memory (3.1MB total)


 Running the same thing as above as root:
 Additional cost: 2.8MB of memory (5.9MB total) (!!)


 Nothing specific to cerebro up to this point.


 Running Cerebro fully-blown as root:
 Additional cost: 1.3MB of memory (7.2MB total)


 It doesn't seem to me that there's much I can do, except for writing some
 parts of Cerebro in C.

-- 
Ticket URL: <http://dev.laptop.org/ticket/8128#comment:2>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list