Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-portage-dev
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-portage-dev@g.o
From: Jason Stubbs <jstubbs@g.o>
Subject: Re: cache subsystem replacement
Date: Tue, 15 Nov 2005 01:13:58 +0900
Was talking with a guy yesterday who mentioned he had 10 line patch that sped 
up current portage a lot with regard to updating metadata. I asked him to 
send it to me and here it is:

--- -   2005-10-29 18:49:15.156173000 +0900
+++ /usr/lib/portage/pym/portage_db_cpickle.py  2005-10-08 11:13:37.000000000 
+0900
@@ -61,6 +61,9 @@
                return False
                        
        def sync(self):
+               return
+
+       def realsync(self):
                if self.modified:
                        try:
                                if os.path.exists(self.filename):
@@ -74,6 +77,6 @@
                                pass
        
        def close(self):
-               self.sync()
+               self.realsync()
                self.db = None;


Obvious why it speeds it up. ;)

I remembered seeing sync_rate when glancing through the new cache stuff and 
then had a look into mirror_cache(). Playing with trg_cache.sync(x), I got 
the following numbers.

x        total #1  total #2  total #3  median sys
1          13.651    13.451    13.727       2.712
10         13.413    13.412    13.645       2.538
100        13.605    13.498    13.405       2.700
1000       13.673    13.726    13.748       2.839
10000      14.541    14.054    13.447       2.743
100000     13.973    13.951    14.512       2.881
1000000    13.583    13.622    13.935       2.669

Command run was:

rm -rf /var/cache/edb/dep/*; time emerge -q metadata

So what does changing the sync_rate actually do? Ease seeks? Should I re-run 
these tests with a reboot in between? (And what happened to the 4 seconds I 
was getting with earlier patches? Bug fixes turn quantity into quality? :)

--
Jason Stubbs

-- 
gentoo-portage-dev@g.o mailing list

Replies:
Re: cache subsystem replacement
-- Brian Harring
References:
cache subsystem replacement
-- Brian Harring
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
cache subsystem replacement
Next by thread:
Re: cache subsystem replacement
Previous by date:
Re: Plugin framework
Next by date:
Re: cache subsystem replacement


Updated Jun 17, 2009

Summary: Archive of the gentoo-portage-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.