View previous topic :: View next topic |
Should Portage be a single program using a light DB backend or many Bash and Python scripts using thousands of text files? |
Yes |
|
78% |
[ 58 ] |
No |
|
21% |
[ 16 ] |
|
Total Votes : 74 |
|
Author |
Message |
Gavinv n00b
Joined: 05 Aug 2004 Posts: 10
|
Posted: Wed Sep 29, 2004 6:04 pm Post subject: New Fast, Light Portage Using Sqlite? |
|
|
I just found this .. looks really interesting, and I see lots of activity in the CVS source, with 5+ developers:
http://sourceforge.net/projects/portage-c/ |
|
Back to top |
|
|
Voltago Advocate
Joined: 02 Sep 2003 Posts: 2593 Location: userland
|
Posted: Wed Sep 29, 2004 6:13 pm Post subject: |
|
|
Whatever does the job... |
|
Back to top |
|
|
gwlinden n00b
Joined: 06 Jan 2003 Posts: 70 Location: Utrecht, The Netherlands
|
Posted: Wed Sep 29, 2004 6:26 pm Post subject: |
|
|
The current portage implementation seems to struggle with the large number of packages. It's getting to be annoyingly slow, especially over NFS, but also when using a local file system.
I'm all for a hashtable-like implementation, as long as there is a way to rebuild the hashtable, in case it gets corrupted. I would not favour a single all singing all dancing portage tool, but rather suggest a small set of simple core programs, and a number of scripts to build the full-fletched tools. Python would be my personal preference, also given the Gentoo heritage. _________________ Gwendolyn |
|
Back to top |
|
|
colonel_dolphin n00b
Joined: 12 Jan 2004 Posts: 39
|
Posted: Wed Sep 29, 2004 6:29 pm Post subject: Portage/Emerge Slowness .. |
|
|
Need both:
1) exclude broad sets of things that will always be irrelevant (e.g. no X/Qt/KDE/Gnome stuff for a Gentoo server), and
2) "quick" emerge sync grabbing only fresh copies of the installed package ebuilds and their dependencies.
https://bugs.gentoo.org/show_bug.cgi?id=5857 |
|
Back to top |
|
|
spb Retired Dev
Joined: 02 Jan 2004 Posts: 2135 Location: Cambridge, UK
|
Posted: Wed Sep 29, 2004 6:45 pm Post subject: |
|
|
Personally, I'm in favour of what's being planned for portage-2.1 and eventually 3.0. A clean API with a core set of modules, neatly seperated, and emerge being *just* a front-end. |
|
Back to top |
|
|
Ruzbeh Apprentice
Joined: 23 Jun 2004 Posts: 223
|
Posted: Wed Sep 29, 2004 7:02 pm Post subject: |
|
|
Those guys, instead of creating a seperate project, they should just help the portage developers! I mean we all want portage to be fast and everything. |
|
Back to top |
|
|
castorilo Apprentice
Joined: 25 Dec 2002 Posts: 157
|
Posted: Wed Sep 29, 2004 7:14 pm Post subject: Re: New Fast, Light Portage Using Sqlite? |
|
|
The poll lacks options. I would like it to be a bunch of python scripts with a light DB back end.
It is my understanding portage-ng is headed that way. |
|
Back to top |
|
|
Voltago Advocate
Joined: 02 Sep 2003 Posts: 2593 Location: userland
|
Posted: Wed Sep 29, 2004 7:36 pm Post subject: |
|
|
AFAIK there is already db backend support implemented in portage, although it is undocumented. |
|
Back to top |
|
|
Pythonhead Developer
Joined: 16 Dec 2002 Posts: 1801 Location: Redondo Beach, Republic of Calif.
|
|
Back to top |
|
|
richk449 Guru
Joined: 24 Oct 2003 Posts: 345
|
Posted: Wed Sep 29, 2004 10:05 pm Post subject: |
|
|
Ummmm, the question says "Should portage be A or B" and my options are "Yes" or "No". I went with "No" to indicate that whoever put the poll together has NO clue. |
|
Back to top |
|
|
Naughtyus Guru
Joined: 14 Jul 2002 Posts: 463 Location: Vancouver, BC
|
Posted: Thu Sep 30, 2004 5:13 am Post subject: |
|
|
Ya, what is the poll asking? The answers don't make sense. |
|
Back to top |
|
|
siti Tux's lil' helper
Joined: 05 May 2003 Posts: 118 Location: Canterbury, New Zealand
|
Posted: Thu Sep 30, 2004 5:38 am Post subject: |
|
|
Well I am the main developer of portage-c. If you want to check it out make sure you have sqlite2 & sqlite3 (I don't have optional dependices with automake - At the moment), Portage 2.0.51 (because I use the new cache), and glib 2. And grab the the latest from CVS - hopefullyl it compiles
Already you can see how insanly fast c/sqlite is
Also if anyone wants to help out please send me a message/email. |
|
Back to top |
|
|
MooktaKiNG Guru
Joined: 11 Nov 2002 Posts: 326 Location: London, UK
|
Posted: Tue Oct 05, 2004 8:33 pm Post subject: |
|
|
Would be nice to have a website that shows the speed improvements for portage-c, and how to install the thing.
I just want to know how good it is before i start compiling _________________ http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router |
|
Back to top |
|
|
Trevoke Advocate
Joined: 04 Sep 2004 Posts: 4099 Location: NY, NY
|
Posted: Wed Oct 06, 2004 12:48 pm Post subject: |
|
|
Should it be ... OR should it be ...
The test returns 1. _________________ Votre moment detente
What is the nature of conflict? |
|
Back to top |
|
|
colonel_dolphin n00b
Joined: 12 Jan 2004 Posts: 39
|
Posted: Wed Oct 06, 2004 8:36 pm Post subject: Why an alternative to "official" portage? |
|
|
Ruzbeh wrote: | Those guys, instead of creating a seperate project, they should just help the portage developers! I mean we all want portage to be fast and everything. |
1. Portage-C has great traction with excellent results already.
2. Portage-ng appears to be dead leaving only the original portage and Portage-C options for Gentoo users.
3. Official portage team is "full" .. only soo many developers can fit in a box working on the same code
4. Portage-c made different design decisions in some areas that may appeal differently to different people (after all Gentoo is about choice).
5. Official portage team's progress rate may differ from Portage-C team. One group might complete a useful, stable product sooner than the other.
6. Official portage team is unresponsive to significant security problems.
See https://forums.gentoo.org/viewtopic.php?p=1594916#1594916 No replies to bug/security hole posted over 6 months ago.
7. When is competition amongst similar packages/tools a bad thing in Gentoo?
8. Unsupported "mods" like the unofficial SQL backend for portage do not interest me, since no one is actively maintaining/supporting/developing it. However, Portage-C is making great progress and offers some advantages that strongly appeal to me .. such as the organization, performance, and robustness of a supported SQL backend.
I'm not knocking the current portage team .. I believe they have created the "best in class" solution for any *nix distro, but I have concerns over when and whether the 2.x or 3.x versions will offer the features I would like.
Last edited by colonel_dolphin on Wed Oct 06, 2004 8:46 pm; edited 2 times in total |
|
Back to top |
|
|
miqorz Veteran
Joined: 04 Apr 2004 Posts: 1170 Location: Pissing into the wind.
|
Posted: Wed Oct 06, 2004 8:38 pm Post subject: |
|
|
I vote for anything that doesn't use python so it isn't slow as fizuck. |
|
Back to top |
|
|
placeholder Advocate
Joined: 07 Feb 2004 Posts: 2500
|
Posted: Wed Oct 06, 2004 8:56 pm Post subject: |
|
|
In my experiences with Python and C/C++, the speeds are generally the same. It is all the things that the python scripts must take into account that makes it take so long, and C/C++ binaries would inherit the same latency because they are still searching through all of those directories.
I am for taking the need for bash out and just using more standard scripting using the $SHELL variable. I personally do not like needing to keep bash on my system since I use Zsh and am a clean freak about my installation(never to the point of reinstalling it though). |
|
Back to top |
|
|
miqorz Veteran
Joined: 04 Apr 2004 Posts: 1170 Location: Pissing into the wind.
|
Posted: Wed Oct 06, 2004 8:58 pm Post subject: |
|
|
Pwnz3r wrote: | In my experiences with Python and C/C++, the speeds are generally the same. It is all the things that the python scripts must take into account that makes it take so long, and C/C++ binaries would inherit the same latency because they are still searching through all of those directories.
I am for taking the need for bash out and just using more standard scripting using the $SHELL variable. I personally do not like needing to keep bash on my system since I use Zsh and am a clean freak about my installation(never to the point of reinstalling it though). |
Try emerge -s sometime and then get back to me. |
|
Back to top |
|
|
colonel_dolphin n00b
Joined: 12 Jan 2004 Posts: 39
|
Posted: Wed Oct 06, 2004 9:02 pm Post subject: |
|
|
Also run "top" and watch how much memory is consumed .. |
|
Back to top |
|
|
placeholder Advocate
Joined: 07 Feb 2004 Posts: 2500
|
Posted: Wed Oct 06, 2004 9:03 pm Post subject: |
|
|
miqorz wrote: | Try emerge -s sometime and then get back to me. |
Oh, so you have a C/C++ binary to which we can compare this? You would make a terrible scientist, so please do not think of entering the field of science.... |
|
Back to top |
|
|
firephoto Veteran
Joined: 29 Oct 2003 Posts: 1612 Location: +48° 5' 23.40", -119° 48' 30.00"
|
Posted: Wed Oct 06, 2004 9:21 pm Post subject: |
|
|
So you say the speeds are the same between c++ and python, show us your trials and tests that brought you to this conclusion. And I do believe this topic was about a portage database backend rather than python scripts so I'm not sure where the c++ came from.
Don't float your ideas as factual and then turn around and ask for proof from someone else, makes you look bad.
There is a slowness to portage that doesn't seem to be necessary, a database makes sense and also only updating what has changed in the tree rather than the whole tree itself. Last I checked emerge sync was bringing in 95,000+ files each time. I've also noticed that sometimes it's slower than other times and it's behavior is different. Sometimes it's gets the 95,000 files and updates the cache while other times it has lots of output of doing things and talking back and forth to the server.
Anyway I'm all for something that is more efficient which should speed things up a little. |
|
Back to top |
|
|
Dolio l33t
Joined: 17 Jun 2002 Posts: 650
|
Posted: Thu Oct 07, 2004 1:37 am Post subject: |
|
|
'emerge -s' isn't slow because of python. It's slow for the same reason that 'find /' is slower than 'locate'.
If you want 'emerge -s' to go fast, emerge esearch. It builds a search index like locate, so searches are almost instantaneous.
And it's written in python. _________________ They don't have a good bathroom to do coke in. |
|
Back to top |
|
|
colonel_dolphin n00b
Joined: 12 Jan 2004 Posts: 39
|
Posted: Thu Oct 07, 2004 2:10 am Post subject: the fix is almost worse than the problem .. |
|
|
# time eupdatedb -v
real 4m24.486s
user 1m28.255s
sys 0m12.527s
If "emerge sync" required zero seconds, then using esearch/eupdatedb still requires 4+ minutes every time I sync.
Hmmm ... is this good coding practice?
eupdatedb, line 28:tmpfile = "/tmp/esearchdb.py.tmp"
Storing data as the root user in a well-known location that is potentially writable by ordinary users is usually frowned on ..
Last edited by colonel_dolphin on Thu Oct 07, 2004 5:28 am; edited 2 times in total |
|
Back to top |
|
|
Dolio l33t
Joined: 17 Jun 2002 Posts: 650
|
Posted: Thu Oct 07, 2004 4:49 am Post subject: |
|
|
colonel_dolphin wrote: | # time eupdatedb -v
real 4m24.486s
user 1m28.255s
sys 0m12.527s
If "emerge sync" required zero seconds, then .. |
I'm not sure what you're saying there...
colonel_dolphin wrote: | Hmmm ... is this good coding practice?
eupdatedb, line 28:tmpfile = "/tmp/esearchdb.py.tmp" |
Probably not. I have eupdatedb running in cron, and when my computer crashes (which it does, since I'm crazy and run experimental stuff, and my tv card seldom plays nice) it has a tendency to leave that file around, which causes eupdatedb to never run subsequently until I notice and delete the file.
It needs some sort of global lock file, though, I guess. It should probably be replaced with a pid file (so you can check if a process is actually running) on the locking end. Feel free to contact the maintainer.
My point was, python isn't the slow part. Someone in the MySQL thread said that "emerge -s x" took 30 seconds where with this it takes about 3, all printing, and "esearch -S x" (which should be harder) also starts printing immediately, and takes about 5 seconds, all printing. Python isn't the bottleneck, it's the disk I/O that really kills you, and that'll be true whether you use C or Python (using a database is another story).
Edit: Oh, one question. The bash scripts in Portage are necessary to know what commands are needed to install the package, so you can't get rid of them, can you? cportage just replaces the portage cache (for searching and dependency lookup), right? You still need the whole /usr/portage/ structure with all the thousands of files, correct, or have they incorporated that into the database somehow as well? _________________ They don't have a good bathroom to do coke in. |
|
Back to top |
|
|
plbe l33t
Joined: 01 May 2004 Posts: 661
|
Posted: Thu Oct 07, 2004 1:37 pm Post subject: |
|
|
I like the idea of portage but as others have said its getting very slow with the large amount of packages. I used freebsd for 3 years and found ports to be very fast, an emerge -uD world takes some time while a portupgrade -a is instant yeah a know portupgrade isn't _part_ of ports but even installing a regular application is instant no waiting for calculating dependencies or nothing. Devs should really look at this and maybe rewrite portage in a different language or something since python isn't known for being all that speedy |
|
Back to top |
|
|
|