Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

[TIP] Using psyco to speed up emerge

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
64 posts
  • Previous
  • 1
  • 2
  • 3
  • Next
Author
Message
jpc82
Guru
Guru
Posts: 326
Joined: Sun Mar 09, 2003 4:31 pm

  • Quote

Post by jpc82 » Wed May 26, 2004 12:45 pm

emerge -pUD world went from 10sec to 8sec
emerge -p depclean went from 7sec to 5 sec
Top
papabean
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 130
Joined: Sat Oct 26, 2002 5:28 pm
Location: Sacramento, California
Contact:
Contact papabean
Website

  • Quote

Post by papabean » Thu Jun 03, 2004 10:47 am

What effect, if any, does this have on emerge sync?
-- The world is full of tough guys. It doesn't need me to be one too.
Top
MK
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 97
Joined: Wed Nov 27, 2002 1:20 pm
Location: Bærum, Norway

  • Quote

Post by MK » Thu Jun 03, 2004 11:56 am

Hm, tried it and it does improve speed a little

emerge -up world from 5.5s to 4.2s
emerge -s psyco from 1.8s to 1.3s
emerge -S psyco from 36s to 28s

Helps a little so I'll keep it :)
Top
alec
Apprentice
Apprentice
User avatar
Posts: 270
Joined: Fri Apr 19, 2002 3:02 am
Location: Here
Contact:
Contact alec
Website

  • Quote

Post by alec » Thu Jun 03, 2004 4:26 pm

papabean wrote:What effect, if any, does this have on emerge sync?
Probably none. This only speeds up the execution of the python code in /usr/bin/emerge - 'emerge sync' farms everything out to rsync, so you will probably see no improvement in that department. I find it speeds up dependency calculations and searches.
Top
papabean
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 130
Joined: Sat Oct 26, 2002 5:28 pm
Location: Sacramento, California
Contact:
Contact papabean
Website

  • Quote

Post by papabean » Thu Jun 03, 2004 4:39 pm

alec wrote:
papabean wrote:What effect, if any, does this have on emerge sync?
Probably none. This only speeds up the execution of the python code in /usr/bin/emerge - 'emerge sync' farms everything out to rsync, so you will probably see no improvement in that department. I find it speeds up dependency calculations and searches.
Thanks. I have noticed that searches seem much faster.
-- The world is full of tough guys. It doesn't need me to be one too.
Top
Pink
Veteran
Veteran
User avatar
Posts: 1062
Joined: Thu Jul 24, 2003 11:52 am

  • Quote

Post by Pink » Thu Jun 03, 2004 4:40 pm

I haven't benchmarked it, but it does seem to make a difference here - even if it is only a few seconds, it's got to be worth it.
Top
knarf
Guru
Guru
User avatar
Posts: 338
Joined: Thu Feb 20, 2003 8:28 pm
Location: Geneva, Switzerland

  • Quote

Post by knarf » Sat Jun 05, 2004 10:25 pm

With :

Code: Select all

real    0m28.690s
user    0m21.925s
sys     0m2.540s
Without :

Code: Select all

real    0m26.932s
user    0m24.073s
sys     0m2.663s
Top
Species
n00b
n00b
Posts: 21
Joined: Fri Jan 16, 2004 12:17 pm
Location: Germany

  • Quote

Post by Species » Mon Jun 07, 2004 3:28 pm

same speedup effect as described on my laptop :)

without psyco:

Code: Select all

# emerge -pvDe world
real 0m17.276s
user 0m13.736s
sys 0m3.488s
with psyco:

Code: Select all

# emerge -pvDe world
real 0m12.917s
user 0m9.789s
sys 0m3.002s
Top
Gil-galad55
Tux's lil' helper
Tux's lil' helper
Posts: 101
Joined: Mon Feb 02, 2004 7:50 pm

  • Quote

Post by Gil-galad55 » Wed Jun 16, 2004 1:57 pm

Since this is an I/O bound process, most likely those people with significant time differences have either small world files (less I/O required) or slower processors, where the more efficient code helps out. As the world file increases, I can see the two times converging as I/O dominates.
a^2 + b^2 = c^2
"To strive, to seek, to find, and not to yield." Tennyson
Top
guard0
Tux's lil' helper
Tux's lil' helper
Posts: 96
Joined: Thu Jun 26, 2003 11:15 pm

  • Quote

Post by guard0 » Wed Jun 16, 2004 2:59 pm

i doubt it would be of much worth as a USE flag, but as a FEATURES flag (where you put distcc, ccache, sandbox, etc) since it would primarily be used for portage utilities...
Linux on an AMD processor: an OS for people who dont use deoderant with a CPU for people who can't afford deoderant
Top
aridhol
Guru
Guru
Posts: 509
Joined: Mon Jan 20, 2003 3:25 pm
Location: Stockholm, Sweden
Contact:
Contact aridhol
Website

  • Quote

Post by aridhol » Thu Jun 17, 2004 4:49 pm

For you speedfreaks it might be interested to know you can use mySQL to do your searches:

http://forums.gentoo.org/viewtopic.php?t=175461
72 of Pitcairn Islands 49 inhabitants use Seti@Home
"If you buy a DVD you have a copy. If you want a backup copy you buy another one."
"Anyone who is capable of getting themselves made President should on no account be allowed to do the job."
Top
madmango
Guru
Guru
User avatar
Posts: 507
Joined: Tue Jul 15, 2003 1:18 pm
Location: PA, USA
Contact:
Contact madmango
Website

  • Quote

Post by madmango » Thu Jun 17, 2004 5:04 pm

time emerge -peD world


without: 5.997 sec
with: 5.977 sec

wOw! Amazing .2 second decrease!
word.
Top
polle
Veteran
Veteran
User avatar
Posts: 1498
Joined: Fri Feb 28, 2003 5:07 pm
Location: Belgium

  • Quote

Post by polle » Thu Jun 17, 2004 6:48 pm

I get this error:

File "/usr/bin/emerge", line 12
except ImportError:
^
SyntaxError: invalid syntax

I tried to copy and paste from the above but still get that error
(used nano to edit the file /usr/bin/emerge and tried with and without a space before except)
Top
fca
Guru
Guru
Posts: 346
Joined: Sat Feb 22, 2003 5:14 pm
Location: Netherlands

  • Quote

Post by fca » Fri Jul 02, 2004 10:50 am

unfortunately this doesn't work on a Pax protected system, The psyco compiler gets killed then.

Code: Select all

Jul  2 12:41:29 [kernel] PAX: execution attempt in: <anonymous mapping>, 17d6a000-17e1e000 17d6a000
Top
c0balt
Guru
Guru
User avatar
Posts: 441
Joined: Sun Jul 04, 2004 12:45 pm
Location: Germany

  • Quote

Post by c0balt » Thu Aug 05, 2004 3:22 pm

Hi,
couldnt this be added to portage officially?
afaik the code doesnt brake anything if psyco isnt installed.
everytime theres a new portage package one has to add the lines manually, though thats not that often its annoying and i tend to forget ;)
Top
blu3bird
Retired Dev
Retired Dev
Posts: 619
Joined: Sat Oct 04, 2003 10:19 am
Location: Munich, Germany

  • Quote

Post by blu3bird » Sat Aug 07, 2004 9:35 am

emere -up world:

Code: Select all

without psyco:
7 Secunds
with psyco:
5 Seconds
emere -s gentoo:

Code: Select all

without psyco:
3 Secunds
with psyco:
3 Seconds
not as fast as it should be, but okay :)
Top
thinko
n00b
n00b
Posts: 6
Joined: Wed Jul 23, 2003 3:02 am

Emerge runtimes with psyco enabled.

  • Quote

Post by thinko » Tue Sep 14, 2004 7:22 am

I think you guys haven't correctly configured psyco.. when I use it with emerge, I see a significant benefit every time.

ex: emerge -pDuv world
Without Psyco:

Code: Select all

real    0m34.392s
user    0m23.512s
sys     0m3.056s
With Psyco:

Code: Select all

real    0m21.905s
user    0m16.532s
sys     0m2.709s
or.. emerge -pe world
Without Psyco:

Code: Select all

real    0m34.925s
user    0m23.368s
sys     0m3.142s
With Psyco:

Code: Select all

real    0m24.636s
user    0m17.210s
sys     0m2.844s
Funny, I think it's well worth it.
Top
Pythonhead
Developer
Developer
User avatar
Posts: 1801
Joined: Mon Dec 16, 2002 6:30 pm
Location: Redondo Beach, Republic of Calif.
Contact:
Contact Pythonhead
Website

  • Quote

Post by Pythonhead » Tue Sep 14, 2004 10:11 pm

All these tests are pretty meaningless. I notice everyone is timing the psyco version second. All this stuff is getting cached, so whenever you run a second test, it should be faster, psyco or not:

I boot up my system and run emerge -ep world:

real 0m51.199s
user 0m15.540s
sys 0m1.467s

Then run it again immediately:

real 0m25.222s
user 0m15.376s
sys 0m1.192s

(neither test using psyco)

There was already a bug filed asking to put psyco in portage (where requests go, not these forums, by the way) and it was declined:

http://bugs.gentoo.org/show_bug.cgi?id=45793

Also, psyco also uses an enormous amount of memory, so wouldn't be great for everyone.

psyco may help a tiny bit for searching portage, but its almost all disk i/o that is the bottleneck. Thats why people aren't getting much if any speedups with the mysql portage backend (last I checked).
Top
neysx
Retired Dev
Retired Dev
User avatar
Posts: 795
Joined: Mon Jan 27, 2003 10:16 am
Contact:
Contact neysx
Website

  • Quote

Post by neysx » Tue Sep 14, 2004 10:57 pm

Psyco can improve performances significantly depending on CPU/IO/World file.

On a Via C3-800
#1 w/psyco:
real 0m30.547s
user 0m12.717s
sys 0m1.980s

#2 w/ psyco again (cached data):
real 0m15.492s
user 0m12.352s
sys 0m1.694s

#3 wo/psyco (data still in cache):
real 0m21.210s
user 0m17.691s
sys 0m1.541s

Another run wo/psyco yields the same values.

Same test on an old P100 (2x with psyco, 1x without)
real 1m54.831s
user 1m38.690s
sys 0m7.410s

real 1m45.879s
user 1m38.610s
sys 0m6.620s

real 2m25.927s
user 2m18.590s
sys 0m6.510s

On my 2xMp2400+ (huge world file)
with psyco
real 1m25.650s
user 1m4.695s
sys 0m10.188s

without
real 1m31.772s
user 1m12.129s
sys 0m10.334s

Generally speaking, using psyco does not make much sense on fast modern machines but it has its uses on old equipment.
Top
fbd
n00b
n00b
Posts: 21
Joined: Sun Sep 12, 2004 9:57 pm
Location: Akureyri, Iceland

:)

  • Quote

Post by fbd » Sat Oct 09, 2004 12:19 pm

AlterEgo wrote:Tried:
emerge -pu world: 1 min 20 sec.
With psyco: 1 min 18 seconds.

Not that amazing :roll:
Try using emerge -s somename

You will see the diffrence :P
Frailty, thy name is woman!
Top
v0m1t
n00b
n00b
Posts: 11
Joined: Fri Aug 20, 2004 2:32 pm

  • Quote

Post by v0m1t » Sat Oct 09, 2004 1:22 pm

emerge -s xmms with psyco
real 0m11.637s
user 0m4.909s
sys 0m0.480s

emerge -s xmms without psyco
real 0m8.575s
user 0m5.106s
sys 0m0.454s



Both tests with cached results.
Top
redshift
Tux's lil' helper
Tux's lil' helper
Posts: 98
Joined: Wed Nov 26, 2003 8:23 pm
Contact:
Contact redshift
Website

  • Quote

Post by redshift » Tue Oct 12, 2004 2:46 pm

With portage 2.0.51_rc9, this seems to give me constant segfaults. Before emerging rc9 today (from rc7) I never had problems, and psyco did give a little boost.
Tom
Top
Trevoke
Advocate
Advocate
User avatar
Posts: 4099
Joined: Sat Sep 04, 2004 6:01 pm
Location: NY, NY
Contact:
Contact Trevoke
Website

  • Quote

Post by Trevoke » Tue Oct 12, 2004 2:53 pm

Same issue here. New portage no like psyco.
Votre moment detente
What is the nature of conflict?
Top
Jtb
Apprentice
Apprentice
Posts: 157
Joined: Fri Dec 19, 2003 10:18 pm
Location: Germany/Darmstadt
Contact:
Contact Jtb
Website

  • Quote

Post by Jtb » Thu Oct 14, 2004 10:00 am

Just tried it on a fast machine (AMD64 3000+ with 1GB but 32bit Gentoo):

time emerge search psyco
with:
real 0m9.545s
user 0m0.778s
sys 0m0.191s

without:
real 0m7.229s
user 0m0.946s
sys 0m0.165s


time emerge -S psyco
with:
real 1m0.649s
user 0m16.814s
sys 0m3.649s

without:
real 1m11.777s
user 0m29.205s
sys 0m3.637s


time emerge -ep world
without:
real 0m44.441s
user 0m13.307s
sys 0m1.066s

with:
real 0m16.807s
user 0m8.227s
sys 0m0.968s


Reboots between with and without:
emerge search psyco, emerge -S psyco [reboot] emerge search psyco, emerge -S psyco [reboot emerge -ep world [reboot] emerge -ep world
Jens

.. God is real - unless declared integer!
Top
Viha
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 121
Joined: Sat Oct 04, 2003 4:06 pm
Location: Jon's World

  • Quote

Post by Viha » Thu Oct 14, 2004 12:06 pm

Segfaulted here on emerge clean (portage 2.0.51_rc9).
Top
Post Reply

64 posts
  • Previous
  • 1
  • 2
  • 3
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic