суббота, 14 апреля 2012 г.

making kubuntu use less memory

i run kubuntu on a 1gb ram netbook, and optimizing KDE memory usage is cruicial for me because i use this machine for development (kdevelop is a large beast, and i want to have chromium and gcc running as well). I'd like to share a few tips to achieve that.

1. sudo apt-get install kubuntu-low-fat-settings
2. if you don't need bluetooth: sudo apt-get purge bluez* bluedevil
3. sudo apt-get purge akonadi-backend-mysql mysql* (this will automatically install sqlite backend)
4. if you don't use activities: sudo rm /usr/share/kde4/services/kactivitymanagerd.desktop (i filled bug 298088 with request to make kactivitymanagerd ran only when really needed)
5. if you don't need akonadi: sudo rm /usr/share/autostart/akonaditray.desktop
6. if you don't use nepomuk (i.e. disabled it in systemsettings): sudo rm /usr/share/autostart/nepomukserver.desktop
7. sudo rm /usr/share/autostart/kaddressbookmigrator.desktop
8. if you don't use printer often: sudo rm /usr/share/autostart/printer-applet.desktop (you can still start this applet manually by issuing 'printer-applet' command in konsole)
9. sudo mv /etc/rc5.d/S50saned /etc/rc5.d/K50saned

(hint by Dave: instead of removing .desktop files, just do 'cp FILE ~/.kde/share/autostart && echo Hidden=true >> ~/.kde/share/autostart/FILE)

Currently my Kubuntu uses 222mb right after startup.

Also i'm investigating why the programs I really need (kmix, klipper, etc) are taking so much ram. first results showed that at least 4megs are used to store font data (allocated by qHBNewFace() call in src/gui/text/qfontengine_ft.cpp, and this is not shared across different processes!)

Please share any additional ideas on how to reduce memory footprint of KDE.