[轉貼]增進 KDE 效能的小技巧

歡迎 KDE 使用心得、K 系列軟體介紹、各項 KDE 應用技巧、桌面佈景、特殊應用等討論。

版主: AceLan, Franklin

[轉貼]增進 KDE 效能的小技巧

文章moto » 週四 4月 10, 2003 3:41 pm

資料來源:http://dforce.sh.cvut.cz/~seli/download/tips.html

KDE performance tips
(Last updated: 16 Jan 2003 )

This page lists some tips that could help you to improve your KDE's performance. There aren't many of them, more of them may show here over the time. Also, KDE developers of course do and will work on various optimizations.

Don't try to optimize your KDE too much, especially if you're less experienced, or you may "optimize" it so much that it won't work correctly anymore (for example, don't remove things from the startkde script for which you don't know what they're supposed to do). Most of the tips have a short summary of the benefits and disadvantages of doing it, so you'll have to consider if the gains are worth it.

--
Lubos Lunak
<l.lunak@kde.org> ; <l.lunak@suse.cz>
(Feel free to mail me if you know some good tip that could be included here.
If you find this page worth translating, or including somewhere, you're allowed to do so.)
Reducing number of running applications

In Konsole, do 'ps ux', you'll see a list of all processes you're running as the user. Reducing their number will obviously reduce memory usage and also KDE startup time, if they're started during KDE startup (also, you can do similarly as user root, and e.g. turn off some unused system services). Processes that are required for KDE desktop are startkde, kdeinit (shown as 'kdeinit: Running...' in the 'ps ux' output), dcopserver, klauncher, kded, ksmserver (shown twice, once as 'kwrapper ksmserver'), knotify, kwin, kdesktop and kicker. You may also ignore kioslaves (kio_file etc.), as those are automatically terminated after being idle for some time.

1. Alarm daemon and KOrganizer alarm client

You can turn off the alarm daemon and KOrganizer alarm client if you don't need them. Alarm daemon is turned off in the control center, in System/Alarm Daemon in KDE3.0, and in KDE Components/Service Manager in KDE3.1. For the KOrganizer alarm client, right click on it, disable 'Start Alarm Client at Login' and quit it.

IMPORTANT: Alarm daemon in KDE versions older than 3.1 has a small bug and may be restored by session management even though it shouldn't. Therefore when disabling it, also make sure it's not running (run 'kalarm --stop' to turn if off), or it will override your setting.

Disabling alarm daemon and KOrganizer alarm client will reduce KDE startup time and memory usage at the expense of not having alarms.
2. KWriteD

If you're running single user machine, you most probably don't need kwrited, the daemon used for showing messages from commands like 'wall' or 'write'. You can disable the daemon in the control center, in Personalization/Konsole in KDE3.0, in KDE Components/Service Manager in KDE3.1.

Disabling kwrited will reduce KDE startup time and memory usage at the expense of not getting wall(1) and write(1) message in KDE.
3. Applets instead of docked applications

If you're running Klipper or KMix as docked applications, quit them, and use their applet counterparts instead (when quiting Klipper, say that you don't want to restart it next time). In fact, many people will probably find KMix applet superior to docked KMix, showing more information in less space (some of the indicators may be hidden).

Using applets instead of docked applications reduces KDE startup time and memory usage.
4. KHotKeys

If you have running process 'khotkeys', it's used for starting applications from K-Menu using keyboard shortcuts. If you don't want it running, just unset all shortcuts in KMenuEdit, or delete file $KDEHOME/share/config/khotkeysrc.

Disabling KHotKeys will reduce KDE startup time and memory usage at the expense of not being able to assign keyboard shortcuts for launching K-Menu entries.
5. Artsd

Disable the artsd sound server in its control center module. Note that obviously without the sound server running, applications using arts for sound won't work, so this is useful mainly if you don't use arts or don't have a soundcard.

Disabling artsd startup will reduce KDE startup time and memory usage at the expense of having no sound in arts applications.
6. KXKB

If you're using KXKB, the docked application for keyboard layouts, you may try disabling it, and either configuring your keyboard layout directly in the XF86config file (consult its manual page), or adding shell script calling setxkbmap (consult its manual page) to your Autostart folder.

Disabling KXKB reduces KDE startup time and memory usage.
7. The KDE splashscreen

Try disabling the splashscreen shown during KDE startup. Currently, you can do so only by editing the startkde script. As user root, modify $KDEDIR/bin/startkde and remove the line saying 'ksplash'. Note that disabling the splashscreen may actually make KDE startup seem to take longer.

Disabling ksplash reduces KDE startup time.
8. Scanning for Netscape plugins

It's possible that your KDE is configured to scan for new Netscape plugins during every startup, which is unnecessary and may be turned off (you'll have it run it manually in such case when there will be changes though). Check that your startkde script doesn't contain any call to nspluginscan. Also check in Konqueror's settings that in the module Plugins that the checkbox "Scan for new plugins at KDE startup" is disabled. There's also a button for manual search in case you installed a new plugin.

Disabling scanning for Netscape plugins reduces KDE startup time.

Various KDE settings

1. Desktop background

Use only single color or simple horizontal/vertical gradient for desktop background, with no wallpaper.

Using simple desktop background will reduce KDE startup time and memory usage.
2. Disabling various eye-candy features

Obviously, KDE without fading menus, transparency, animated icons and similar stuff should run somewhat faster.
3. Antialiasing

Having antialiasing (AA) turned on slows down drawing of texts, so you may consider turning it off in the control center, in the fonts module.
4. Konqueror reusing

In order to reduce time needed for opening new Konqueror windows, Konqueror may be configured to reuse already running processes instead of starting new ones. The setting in the control center in File Browsing/File Manager (the 'Minimize Memory Usage' radio buttons). It may be set to 'Never', which disables Konqueror reusing and always starts a new instance, making all Konqueror windows independent, and when of them crashes, others are unaffected. Next two values are 'For local browsing' and 'For web browsing', which will reuse already running Konqueror instance (if there's any) if you requested to open a new window for browsing local files or web pages respectively. The last value is 'Always', causing Konqueror processes to be reused independent of what you're browsing. The default value is reusing for local browsing, which should be safe. Unless you're experiencing Konqueror crashes, you can try setting it to 'Always'. In such case it may also help to have always one Konqueror window open unused.

Having Konqueror configured for reusing processes often reduces memory usage and time needed for opening new Konqueror windows, at the expense of loosing more Konqueror windows in case of a crash.
5. Upgrade to KDE3.1

As soon as it's available. Does this need an explanation?

Not really KDE things but worth checking anyway

1. /tmp/.ICE-unix

Make sure the directory /tmp/.ICE-unix exists, is owned by user root and has permissions 1777 (accessible to all and sticky). The command 'ls -ld /tmp/.ICE-unix' should show something like

drwxrwxrwt 2 root root 176 2003-01-06 21:25 /tmp/.ICE-unix/

First, third and fourth columns should be like shown above. When this directory isn't created correctly, you may also see message 'IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root' in your ~/.xsession-errors file.

To fix the problem, put the following commands in your system startup scripts (e.g. /etc/init.d/boot.local or /etc/rc.d/rc.local):

chown root:root /tmp/.ICE-unix
chmod 1777 /tmp/.ICE-unix

Having correctly setup /tmp/.ICE-unix saves 5 seconds from the startup time.
2. DMA for disk access

Make sure that you have not disabled DMA (Direct Memory Access for transfers) for disks. Since DMA rarely may cause problems, it's often disabled by default. Some distributions have configuration tools for DMA (e.g. SuSE has YaST2 module for it), or you can check and setup it manually.

As user root, type 'hdparm /dev/hda', where /dev/hda is your disk device. It should also print line 'using_dma = 1 (on)', if it says 'off', you could try turning it on. In order to turn DMA on, type 'hdparm -d1 /dev/hda' (use 'hdparm -t /dev/hda' to check disk throughput). Note that if you explicitly need to turn DMA on, you'll have to do it after every boot, so you should put the command in your system startup scripts. Consults the manual page for hdparm for details and possible problems, especially options -c, -d, -X, -k and -m.

FreeBSD variant (from Mark Rowlands): Type 'sysctl hw.ata.ata_dma', it should return 1 indicating disk is using DMA. If it's not set, use 'sysctl hw.ata.ata_dma=1'. You may also check hw.ata.wc and hw.ata.tags. Please consult manpages for ata(4), atacontrol(4) and sysctl(8) for details and possible problems.

Folks from #kde-freebsd also pointed out http://www.freebsd.org/cgi/man.cgi?tuning as a good manpage about general FreeBSD tunning.

Having DMA enabled decreases CPU usage and increases disk throughput.
3. /tmp directory cleaned after boot

After system boot, check your /tmp directory if it has been cleaned. KDE places some of its cache files there, so after they were cleaned, they'll need to be regenerated. Use the shell variable $KDETMP to change the location (e.g. use 'export KDETMP=/var/tmp' in your .profile file). This problem is currently being investigated and future KDE versions should place their cache files in a better location.

Check also the /tmp/.ICE-unix directory tip.

Placing cache files in a directory that's not often cleaned sometimes reduces KDE startup time.

And, as a bonus ...
The thing that improves KDE performance the most

1. Getting a faster computer

Doing so will definitely do the best job ... like it or not. Where are the computers that could handle Jet Pac nicely, yet wouldn't be able to run even the simplest today's program having only empty main() function ...
歡迎你來到MOTO學園一起討論Debian相關問題。
在post問題前可先別忘記了以下的步驟:
1:翻一下/usr/share/doc/中是否已經有解答了?
2:閱讀一下無痛起步是否已經提到了?
3:找一下google予以解答?
4:善用學園中的"搜尋"功能,往往答案就在裡面窩。
頭像
moto
摩托學園站長
摩托學園站長
 
文章: 2808
註冊時間: 週二 9月 03, 2002 3:37 am
來自: 台北

回到 KDE 心得技巧

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客