View previous topic :: View next topic |
Author |
Message |
cazort Guru
Joined: 19 Sep 2004 Posts: 343 Location: Lancaster, PA
|
Posted: Fri Mar 24, 2006 3:42 am Post subject: |
|
|
OK...what I don't understand is why this has been known for well over a year, and yet, it's not integrated into the basic portage yet, whereas developers have engaged (and succesfully, with beautiful results) in much bigger, more complex projects such as the kde split ebuilds.
Why can't this be integrated into the main portage tree? I'm a little bit reluctant to use something like this that is still experimental and "unsupported" on a production server...and yet on this very server it takes FOREVER to emerge sync...really ridiculous. It's taking almost an hour, and using most of the server's resources, on a celeron-2.0ghz machine.
I dunno? It just seems like...this should be integrated into the main portage thing? Portage just keeps getting slower and slower as it grows...and this "solution" remains unsupported and out of the mainstream.
Is there something holding it back? _________________ Alex Zorach | Teacology | RateTea | Why This Way |
|
Back to top |
|
|
pussi l33t
Joined: 08 May 2004 Posts: 727 Location: Finland
|
|
Back to top |
|
|
cazort Guru
Joined: 19 Sep 2004 Posts: 343 Location: Lancaster, PA
|
Posted: Wed Mar 29, 2006 4:50 pm Post subject: |
|
|
Ok...read that part...damn...hmm...
There has to be a way around this? Obviously, we are lightyears ahead of many other OS's, especially a particular one that is not worthy of being named. However...we need to think up a creative solution. Portage keeps growing...the rate at which it is slowing down seems to be exceeding the rate at which the hardware is getting faster. Portage used to sync faster on my old boxes than it does on my newer one now...and like I said, the sync speed is so slow as to make the system unusable.
What other options are there?
Here's a really simple solution (feel free to point out my stupidity if there is a basic reason why it wouldn't work):
Anything that depends on the external module written in C, it could run as a separate process? This is how most UNIX applications work anyway. What would be the problem with that? If it segfaults, then it would not segfault the portage process. You could then write error-handling code to fall back on a safer mechanism in the case that the database part of it broke. It seems like all this would not be terribly difficult to do either.
Am I missing something? _________________ Alex Zorach | Teacology | RateTea | Why This Way |
|
Back to top |
|
|
cazort Guru
Joined: 19 Sep 2004 Posts: 343 Location: Lancaster, PA
|
Posted: Wed Mar 29, 2006 4:54 pm Post subject: |
|
|
maybe I just need to play around with 2.1...it seems that maybe they've solved the speed problem some other way?
_________________ Alex Zorach | Teacology | RateTea | Why This Way |
|
Back to top |
|
|
wah Guru
Joined: 25 Feb 2005 Posts: 453 Location: Raleigh, NC, USA
|
Posted: Wed Mar 29, 2006 6:43 pm Post subject: |
|
|
Just a "hey, I like it" post:
Pre-cdb:
Code: |
belisarius ~ # time emerge -s mozilla > /dev/null
real 0m2.844s
user 0m1.956s
sys 0m0.216s
|
Post-cdb, 3 instances:
Code: |
belisarius ~ # time emerge -s mozilla > /dev/null
real 0m1.113s
user 0m0.984s
sys 0m0.076s
belisarius ~ # time emerge -s mozilla > /dev/null
real 0m1.113s
user 0m0.964s
sys 0m0.100s
belisarius ~ # time emerge -s mozilla > /dev/null
real 0m1.073s
user 0m0.912s
sys 0m0.112s
|
Tested on a Dell D600 Pentium-M 1.6Ghz, 1GB RAM
Thanks! Can't wait to put this on some of my older b0xen!
Cheers,
Wah _________________ - AMD64 3000+, MSI K8N-SLI, Nvidia Geforce 6600 PCIE, 2GB OCZ Dual-Channel PC3200,2x160GB SATA
- Registered Linux User #418541 |
|
Back to top |
|
|
binaural Tux's lil' helper
Joined: 02 Dec 2004 Posts: 138
|
Posted: Tue Apr 04, 2006 11:29 pm Post subject: |
|
|
I'm with wahman... this really kicks ass, it's pretty much the standard "Thing I do for all my gentoo boxes" now _________________ Happy vimming! |
|
Back to top |
|
|
behd Apprentice
Joined: 11 Feb 2003 Posts: 155
|
Posted: Tue Apr 11, 2006 8:15 am Post subject: |
|
|
w0000t... well done, great job !
another satisfied customer
(only downside, being a hypothetically risk of segfault once in a while ?!?
with all the time saved by your code, I could probably afford this risk, and
spend a bit time if it ever happen). |
|
Back to top |
|
|
Bigun Advocate
Joined: 21 Sep 2003 Posts: 2196
|
Posted: Tue Apr 11, 2006 12:03 pm Post subject: |
|
|
behd wrote: | w0000t... well done, great job !
another satisfied customer
(only downside, being a hypothetically risk of segfault once in a while ?!?
with all the time saved by your code, I could probably afford this risk, and
spend a bit time if it ever happen). |
Been using this lil' workaround for months now, no segfaults.... no problems. _________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
|
schachti Advocate
Joined: 28 Jul 2003 Posts: 3765 Location: Gifhorn, Germany
|
Posted: Fri May 05, 2006 1:04 pm Post subject: |
|
|
Hmm, on one system, it works well, but on another system, I always get:
Code: |
gollum ~ # emerge metadata
skipping sync
>>> Updating Portage cache: 93%
!!! Failed to open the dbmodule for eclass caching.
!!! Generally these are permission problems. Caught exception follows:
!!! (2, 'No such file or directory')
!!! Dirname: /var/cache/edb/dep//usr/portage/
!!! Basename: x11-misc-eclass
|
What's going wrong here? _________________ Never argue with an idiot. He brings you down to his level, then beats you with experience.
How-To: Daten verschlüsselt auf DVD speichern. |
|
Back to top |
|
|
optiluca Guru
Joined: 16 Jan 2006 Posts: 545 Location: Rivergaro, Italy
|
Posted: Fri May 05, 2006 4:53 pm Post subject: |
|
|
Code: | emerge metadata
====================================
Error: Failed to import module 'portage_db_cdb.database'
File "/usr/lib/portage/pym/portage.py", line 1386, in load_best_module
mod = load_mod(best_mod)
File "/usr/lib/portage/pym/portage.py", line 145, in load_mod
mod = __import__(modname)
File "/usr/lib/portage/pym/portage_db_cdb.py", line 17, in ?
import portage_db_template
No module named portage_db_template
====================================
|
What have I done wrong?? |
|
Back to top |
|
|
schachti Advocate
Joined: 28 Jul 2003 Posts: 3765 Location: Gifhorn, Germany
|
|
Back to top |
|
|
optiluca Guru
Joined: 16 Jan 2006 Posts: 545 Location: Rivergaro, Italy
|
Posted: Fri May 05, 2006 5:18 pm Post subject: |
|
|
portage-2.1_pre10-r2...
And it ISN'T fast... |
|
Back to top |
|
|
BitJam Advocate
Joined: 12 Aug 2003 Posts: 2508 Location: Silver City, NM
|
Posted: Sat May 06, 2006 4:46 am Post subject: |
|
|
I get the same error as optiluca with portage-2.1_pre10-r3. |
|
Back to top |
|
|
Phlogiston Veteran
Joined: 27 Jan 2004 Posts: 1925 Location: Europe, Swizerland
|
Posted: Mon May 08, 2006 1:07 pm Post subject: |
|
|
Eix does not work when I set cdb in eixrc. Is there a known workaround for this? It just does not show any result from the portage directory... only from the overlays, which are not cached. _________________ Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor |
|
Back to top |
|
|
appro Tux's lil' helper
Joined: 21 Jul 2003 Posts: 144 Location: Germany/Rosenheim
|
Posted: Thu May 11, 2006 11:55 am Post subject: |
|
|
https://bugs.gentoo.org/show_bug.cgi?id=132915 _________________ If a packet hits a pocket on a socket on a port, and the bus is interrupted and the interrupt's not caught, then the socket packet pocket has an error to report. |
|
Back to top |
|
|
Phlogiston Veteran
Joined: 27 Jan 2004 Posts: 1925 Location: Europe, Swizerland
|
Posted: Fri May 12, 2006 11:56 am Post subject: |
|
|
appro wrote: | https://bugs.gentoo.org/show_bug.cgi?id=132915 |
Thanks but _________________ Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor |
|
Back to top |
|
|
langec n00b
Joined: 10 Dec 2004 Posts: 21 Location: Bremen, Germany
|
Posted: Sun May 14, 2006 4:41 pm Post subject: Thanks! |
|
|
Thanks a lot for that speedup! |
|
Back to top |
|
|
Autie Guru
Joined: 25 Jul 2003 Posts: 309 Location: Ledegem - Belgium
|
Posted: Sat Jun 10, 2006 9:08 pm Post subject: |
|
|
Changed as the bug said:
Code: | * Running emerge --sync ...
====================================
Error: Failed to import module 'portage_db_cdb.database'
File "/usr/lib/portage/pym/portage.py", line 1418, in load_best_module
mod = load_mod(best_mod)
File "/usr/lib/portage/pym/portage.py", line 145, in load_mod
mod = __import__(modname)
File "/usr/lib/portage/pym/portage_db_cdb.py", line 17, in ?
import portage_db_template
No module named portage_db_template
====================================
* Problems running emerge --sync [ !! ]
====================================
Error: Failed to import module 'portage_db_cdb.database'
File "/usr/lib/portage/pym/portage.py", line 1418, in load_best_module
mod = load_mod(best_mod)
File "/usr/lib/portage/pym/portage.py", line 145, in load_mod
mod = __import__(modname)
File "/usr/lib/portage/pym/portage_db_cdb.py", line 17, in ?
import portage_db_template
No module named portage_db_template
====================================
====================================
Error: Failed to import module 'portage_db_cdb.database'
File "/usr/lib/portage/pym/portage.py", line 1418, in load_best_module
mod = load_mod(best_mod)
File "/usr/lib/portage/pym/portage.py", line 145, in load_mod
mod = __import__(modname)
File "/usr/lib/portage/pym/portage_db_cdb.py", line 17, in ?
import portage_db_template
No module named portage_db_template
====================================
====================================
Error: Failed to import module 'portage_db_cdb.database'
File "/usr/lib/portage/pym/portage.py", line 1418, in load_best_module
mod = load_mod(best_mod)
File "/usr/lib/portage/pym/portage.py", line 145, in load_mod
mod = __import__(modname)
File "/usr/lib/portage/pym/portage_db_cdb.py", line 17, in ?
import portage_db_template
No module named portage_db_template
====================================
|
Really dunno how to fix this _________________ The capacity to learn is a gift; The ability to learn is a skill; The willingness to learn is a choice. |
|
Back to top |
|
|
theoakwise n00b
Joined: 15 May 2004 Posts: 37
|
Posted: Sun Jun 11, 2006 5:56 pm Post subject: |
|
|
Autie wrote: | Changed as the bug said:
<snip>
Really dunno how to fix this |
See this post |
|
Back to top |
|
|
Bigun Advocate
Joined: 21 Sep 2003 Posts: 2196
|
Posted: Mon Jun 12, 2006 11:56 am Post subject: |
|
|
Guh.... back to slow portage again... anyway this could be re-written? _________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
|
monkey prince n00b
Joined: 12 Jun 2006 Posts: 2
|
Posted: Mon Jun 12, 2006 12:29 pm Post subject: |
|
|
check out the wiki for cdb and portage:
http://gentoo-wiki.com/TIP_speed_up_portage_with_cdb
i had the same error messages until i changed my /etc/portage/modules to say
Code: | portdbapi.auxdbmodule = cache.cdb.database
eclass_cache.dbmodule = cache.cdb.database
|
which is what the wiki suggests. after that, i did the etc-update, emerge --sync, etc with no issues.
hope that helps. |
|
Back to top |
|
|
Bigun Advocate
Joined: 21 Sep 2003 Posts: 2196
|
Posted: Mon Jun 12, 2006 12:54 pm Post subject: |
|
|
Doesn't seem to be helping:
Code: | surfer src # emerge --metadata
====================================
Error: Failed to import module 'cache.cdb.database'
File "/usr/lib/portage/pym/portage.py", line 1418, in load_best_module
mod = load_mod(best_mod)
File "/usr/lib/portage/pym/portage.py", line 145, in load_mod
mod = __import__(modname)
No module named cdb
====================================
surfer src # cat /etc/portage/modules
portdbapi.auxdbmodule = cache.cdb.database
eclass_cache.dbmodule = cache.cdb.database
surfer src #
|
_________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
|
Bigun Advocate
Joined: 21 Sep 2003 Posts: 2196
|
Posted: Mon Jun 12, 2006 12:56 pm Post subject: |
|
|
Nevermind:
Somehow I this file had gotten deleted or just wasn't created somehow... I dunno, I got it from the wiki link above:
/usr/lib/portage/pym/cache/cdb.py _________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
|
chl n00b
Joined: 13 May 2003 Posts: 72 Location: Munich
|
Posted: Wed Dec 20, 2006 5:31 am Post subject: |
|
|
I use the cdb-caching method for a long time.
But since portage 2.1.1 became stable, when syncing or updating the cache with "emerge --metadata" the "Updating Portage cache: " part has become significally slower.
Under portage 2.1 the update of the cache from 0% to 100% took just a few seconds, even if I hadn't synced for a long time. But with portage 2.1.1 it takes up to five minutes.
Even if I run "emerge --metadata" several times, the second and further runs take as long as the first one. This happens also, if I disable the cdb-caching.
This is perfectly reproducible. If I downgrade to portage 2.1-r2 it runs like hell, but with the actual stable version (2.1.1-r2) it's slow as a snail.
What are the reasons and is there any possibility to have the old speed also with portage 2.1.1?
CHL _________________ The difficulty in designing something completely foolproof, is not to underestimate the ingenuity of complete fools. |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Wed Dec 20, 2006 5:52 am Post subject: |
|
|
I haven't used the cdb-caching method, although this topic made me want to- until I read the last page! I agree about the speed of portage cache updates; it's definitely got a lot slower. |
|
Back to top |
|
|
|