Speeding up "smart" on low memory systems
Since I started using “smart” instead of “urpmi” in Mandriva, I noticed it was very slow sometimes, when compared to urpmi or apt-get. Today, talking with Niemeyer on #smart, he asked me to try disabling the Psyco Python JIT. It happens that I have a slow system (Pentium II 366MHz) with relatively little memory (128MB), and I need some heavy apps loaded all the time (although using Fluxbox, not KDE).
Psyco is a JIT (just-in-time compiler) for Python, that aims to make apps run faster. Niemeyer says that using it should improve smart speed very good in most systems, and his benchmarks proved that. But reading a little in Psyco docs there is a note: “Drawbacks: Psyco currently uses a lot of memory.” So, I’m pretty sure that in my specific case the problem that makes smart slow is the memory consumption, not the optimizations. Disabling it, makes smart run pretty faster to me, but it’s just because it uses less memory, so it needs less swap (and my HD is reeeealy slow).
So, if you want to test the differences of having Psyco or not on your system, try adding
-o psyco=0 to your smart command line, and test. If you want to make it permanent, use
smart config --set psyco=0.
Niemeyer also asked me to do some benchmarks to see why it’s faster without Psyco, but I’m too lazy to do it now. Whenever I get this done (sometime in the future) I’ll post the results.