Results 1 to 3 of 3

Thread: KDE Optimization

  1. #1
    Join Date
    Dec 2013
    Beans
    17

    Lightbulb KDE Optimization

    This seems to work pretty well. Comments welcome (and yes, I know you have to rebuild the cache on first login after a restart but I so infrequently restart...)

    Step 1: Create a mount point for a tmpfs
    sudo mkdir /tmp-ram

    Step 2: Mount tmpfs on new mount point
    sudo <your favorite editor> /etc/fstab

    Add this line to the bottom of the /etc/fstab
    tmpfs /tmp-ram tmpfs noatime,nosuid,nodev,size={XXX} 0 0

    {XXX} is the maximum amount of RAM you want to dedicate to the temporary file system.
    For example, I have size=900M (900 megabytes)


    Step 3: Create mount
    You can reboot or just issue:
    sudo mount -a

    Step 4:
    Create file in ~/.kde/env named relo.sh

    export KDETMP=/tmp-ram
    export KDEVARTMP=/tmp-ram
    ln -s /tmp-ram/kde-{USERID} ~/.kde/tmp-{HOSTNAME}

    Replace {HOSTNAME} with whatever the hostname command tells you your computer name is. For example, mine is:
    ~/.kde/tmp-enterprise

    Replace {USERID} with your user ID

    I did a chmod +x relo.sh but that is probably not necessary

    Step 5. Log out of KDE

    Step 6. Open a console (Control+Alt+F1) and log in.

    Step 7. Remove tmp-{HOSTNAME}
    rm ~/.kde/tmp-{HOSTNAME}
    (replace {HOSTNAME} with your hostname
    You can then exit the console or if you are lazy you can reboot by issuing the command:
    sudo reboot

    Step 8. Return to X and log in.
    If you didn't reboot use Control+Alt+F7 (not sure it is always on F7). Then log in

    Step 9. Verify
    Open a konsole prompt and issue:
    ls -l ~/.kde

    You should see cache-XXX, socket-XXX, and tmp-XXX as links to /tmp-ram (XXX is your hostname).


    It is pretty easy to reverse all of this. Simply remove relo.sh and delete the tmp file with KDE not running. Then log back in. You can also unmount the tmpfs, remove the fstab line, and delete the tmp-ram mount point.

    This seems to work well for me. Then again, I have a write through SSD cache to a RAID array so writes are expensive even if cached. Your mileage may vary.

  2. #2
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: KDE Optimization

    Would you consider creating a proper tutorial and posting it to the Tutorials subforum? How-to threads posted in support areas tend to be quickly buried and forgotten.

  3. #3
    Join Date
    Dec 2013
    Beans
    17

    Re: KDE Optimization

    I will. However, I was curious if anyone first had any reason this was not a good thing. I had written several tutorials under my pre-sso login (wd5gnr) and considered it here, but thought I'd see if there was any reason to not encourage people to do this.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •