Registered Member
|
If you like KDE, but are annoyed by its long startup times (especially after a cold boot), then you might want to try this. YMMV, as with all things, but for me it made startup a lot faster.
1. Enter runlevel 3, or otherwise turn off your login manager. 2. Create two empty files, 32M each. This can be done with dd, but is better done with fallocate if you're using ext4 or XFS: # fallocate -l 32M /loop_tmp # fallocate -l 32M /loop_var_tmp 3. Format them as ext2. # mke2fs /loop_tmp # mke2fs /loop_var_tmp 4. Add the following fstab entries for them: /loop_tmp /tmp ext2 noatime,nodev,nosuid 0 2 /loop_var_tmp /var/tmp ext2 noatime,nodev,nosuid 0 2 5. Mount all filesystems: # mount -a 6. Correct the permissions on the newly mounted directories: # chmod 1777 /var/tmp # chmod 1777 /tmp 7. Restart your login manager, and log into KDE. Obviously this works by reducing disk I/O delay. With most KDE temp stuff confined to two contiguous 32 MB areas, instead of being scattered all over the disk, startup will (hopefully) be faster; especially as 32 MB is a tiny area on a modern hard disk. Caveats: - I don't know how to do anything like this on *BSD. If you do know how, please comment. - I've only tested this on Slackware 13.37 with KDE 4.5.5. It may be less effective, or entirely ineffective, on earlier or later KDE versions. - Obviously, putting large stuff in /tmp will not be possible after doing this. I'm pretty sure it's "against the rules" for programs to stick hundreds of MB of stuff in /tmp, but not all programs follow the rules. - Finally, it is doubtful that this will work on an SSD. It might even be harmful in some weird non-obvious way. |
Registered Member
|
And an addendum: it seems this will not work on KDE 4.8, and probably other versions, because the plasma theme cache in /var/tmp/kdecache-$USER is too big to fit in the loop-mounted FS.
|
Administrator
|
If you use an area larger than 32mb (say 256mb) for each one, then this technique should still be workable under KDE Trunk. No idea how this affects the performance though.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Thanks. Unfortunately the performance impact appears to be negative with KDE 4.8 and 256 MB filesystems - my hot startup time went from 20 to 40 seconds. Not sure what would account for that... But this is, at any rate, a cheap trick. It seems to me that the real problem is Plasma incorporating everything but the kitchen sink by default. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]