Gentoo Archives: gentoo-user

From: Peter <pete4abw@×××××××.net>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Portage 50-51% and emerge metadata timings
Date: Wed, 28 Dec 2005 15:59:46
Message-Id: pan.2005.12.28.15.53.15.884294@comcast.net
1 peter@mars ~ $ sudo emerge info
2 Portage 2.0.53 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-gentoo-r5 i686)
3 =================================================================
4 System uname: 2.6.14-gentoo-r5 i686 AMD Athlon(tm) XP 2800+
5 Gentoo Base System version 1.6.14
6 dev-lang/python: 2.4.2
7 sys-apps/sandbox: 1.2.12
8 sys-devel/autoconf: 2.13, 2.59-r6
9 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
10 sys-devel/binutils: 2.16.1
11 sys-devel/libtool: 1.5.20
12 virtual/os-headers: 2.6.11-r3
13
14 I'd seen all the threads on the problems with portage getting held up
15 during emerge metadata. Since around a month ago, I have suffered through
16 the holdup almost every day. Sometimes, it would take 5 or more minutes!
17
18 I read as much as I could on the various forums and ng and wanted to post
19 MY suggested workaround.
20
21 In a nutshell, I found that portage needed to be on its own partition and
22 had to be backed up and restored onto a clean partition. By doing this
23 alone, there was no more dreaded 50-51% holdup.
24
25 I also found that it did not make much difference whether I used ext2,3 or
26 reiserfs when running emerge metadata. In fact, reiser was slower by
27 around 30 seconds (57-ext3 vs 1:30-reiser). This was not surprising since
28 on the namesys website they note that programs like find won't perform as
29 well due to its internal organization. Interestingly, if I ran emerge
30 metadata a second time on reiser, the speed dropped to 45 seconds. I
31 imagine this is because of directory caching.
32
33 On my particular setup, I have one partition that includes portage,
34 portage overlay, distfiles, and portage tmp dir. I set all these in
35 make.conf.
36
37 Having portage in /usr is kind of a contradiction imho, since most files
38 there are supposed to be static, not changing all the time. Moving portage
39 and its related files elsewhere makes everything a log cleaner, and at
40 least in my case, faster.
41
42 >From my make.conf. Note, /mnt/src is my portage partition.
43
44 PORT_LOGDIR="/var/log/portage"
45 PORTDIR="/mnt/src/portage"
46 PORTDIR_OVERLAY="/mnt/src/local/portage"
47 PORTAGE_TMPDIR="/mnt/src/var/tmp"
48 DISTDIR="/mnt/src/distfiles"
49
50 For right now, I have reiser handling /mnt/src, and I'll leave this alone
51 for a while. Don't know if performance will improve. It _might_ since
52 the act of syncing will force a read through the entire portage tree
53 which might make metadata faster
54
55 HTH.
56
57 Suggestions:
58
59 0) You _are_ backed up, right? At least, save the directories you'll be
60 working on!
61 1) make a partition. 1+G for /usr/portage. Larger for additional files.
62 I have 7 gig for my setup. Filesystem is up to you. Just make sure kernel
63 support is enabled (i.e. reiser) and appropriate support files loaded.
64 2) copy over existing portage using cp -Rp (preserve times and
65 permissions otherwise portage will download the entire tree), or tar it
66 and untar it. Whatever works. Just make sure that make.conf is adjusted
67 and /etc/make.profile is relinked to the new location.
68
69 /etc/make.profile -> /mnt/src/portage/profiles/default-linux/x86/2005.0
70
71 This is important otherwise any emerge command will bomb. Your link may
72 differ depending on your arch. ls -l /etc/make.profile will show what you
73 need to do. Just substitute your new portage location and add the rest.
74
75 3) update make.conf.
76 4) see if everything works, try emerge -s, emerge sync, metadata.
77 5) if it does, you can purge /usr/portage and any other directories you
78 moved over to your dedicated portage partition.
79
80
81 --
82 gentoo-user@g.o mailing list

Replies

Subject Author
[gentoo-user] Re: Portage 50-51% and emerge metadata timings Peter <pete4abw@×××××××.net>
[gentoo-user] Re: Portage 50-51% and emerge metadata timings Peter <pete4abw@×××××××.net>