[Yum-devel] yum memory use question
menno-yum at freshfoo.com
Wed Dec 8 10:43:43 UTC 2004
seth vidal wrote:
> import yum
> foo = yum.YumBase()
> foo.setConfigOption('cache', 1)
This line doesn't work. Should be:
> at this point only the repodata from primary.xml should be read into
> I'm seeing a memory foot print of something like 49M with fc3 + updates
> in memory.
I see similar with those repos enabled. With the extra repos in my
config I hit around 67MB!
> That seems high to me, any ideas?
I've traced it through by using lots of prints and raw_input()'s. Memory
usage jumps up from around 15MB to 47MB in the self.repos.populateSack()
call in doSackSetup().
Inside populateSack() the following lines both contribute to most of the
dobj = repo.cacheHandler.getPrimary(xml, csum) (~28MB increase)
self.pkgSack.addDict(repo.id, item, dobj, callback) (~10MB increase)
This large allocation of memory occurs when processing the metadata for
the first repository, which is "Base" (ie. the first loop of the outer
loop and the first loop of the inner loop, item == "metadata"). The
second repository "updates" doesn't seem to add too much more to yum's
I didn't go into it any further but that should give you a pretty good
Scanned by the NetBox from NetBox Blue
More information about the Yum-devel