1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

KDE is either a Ram Hog or misconfigured, It's slow

Discussion in 'KDE' started by ElectricRider, Aug 20, 2011.

  1. ElectricRider

    ElectricRider New Member

    Messages:
    41
    Likes Received:
    0
    KDE is slow on 8.2 Hubble and the 9.0 Isotope beta of PC-BSD but Gnome is as fast as it normally should be. Other than turning off desktop effects, (or using another DE) are there other ways to improve the speed and performance of KDE on my FreeBSD based system?

    I notice sometimes if I open the application menu, it doesn't close until I hit the Escape button.

    These are my system specs with 4 gigs of Ram:

    HP Compaq Presario CQ61 WM 411 64 Bit

    Product Number WA980UA#ABA
    Microprocessor 2.1GHz AMD Sempron Processor for Notebook PCs M120
    Microprocessor Cache 512KB L2 Cache
    Memory 2GB
    Memory Max 4096MB
    Video Graphics ATI Mobility Radeon HD 4200 Graphics
    Video Memory 128MB Display Cache Memory (up to 1022MB total graphics memory )
    Hard Drive 250GB (7200RPM)
    Multimedia Drive LightScribe SuperMulti 8X DVD±R/RW with Double Layer Support
    Display 15.6" Diagonal High-Definition HP BrightView Widescreen Display (1366x768)
    Fax/Modem High speed 56k modem
    Network Card Integrated 10/100 Ethernet LAN
    Wireless Connectivity 802.11b/g/n WLAN
    Sound Altec Lansing
     
  2. xibo

    xibo New Member

    Messages:
    383
    Likes Received:
    0
    As I wrote here, at the very bottom and right over your post :)P), desktop experience without nvidia graphics will not be too great on FreeBSD.

    Also, if you can influence the maximum video memory, reduce it to something sane, like 128 or 256 MB , and increase the kern.ipc.shmmax tunable to at least 128MB, too.

    KDE is indeed a RAM hog, and bloated up in any other consideration, too. Turning off unneeded bloat (especially the semantic desktop stuff) will make KDE a bit faster. You could setup a swap device, and look how much memory gets paged.
     
  3. OH

    OH New Member

    Messages:
    209
    Likes Received:
    0
    Highlighted to express that this really is a big help.
     
  4. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,180
    Likes Received:
    10
    I disagree with that. A Radeon 4200 should handle KDE okay (well... as well as anything handles it). PCBSD had AEI off set on some earlier versions, which can cause mouse/keyboard dragginess.

    ElectricRider, consider asking the PCBSD folks about it; they know their system better than we do. If you want to continue here, post your xorg.conf and use pastebin.com to link /var/log/Xorg.0.log.
     
  5. adamk

    adamk New Member

    Messages:
    1,624
    Likes Received:
    0
    Also, please show us the output of 'glxinfo'

    Adam
     
  6. davidgurvich

    davidgurvich New Member

    Messages:
    195
    Likes Received:
    0
    On your system kde should be very snappy. Turning off the semantic desktop garbage won't help much. Obvious places to look are graphics, mouse, keyboard, and usb. Also, create a new user with no widgets on the desktop(no panel), just a blank screen. Try changing the theme(some themes don't work well with some settings).
     
  7. ElectricRider

    ElectricRider New Member

    Messages:
    41
    Likes Received:
    0
    I assume the " semantic desktop stuff" means the desktop effects?

    "Also, if you can influence the maximum video memory, reduce it to something sane, like 128 or 256 MB , and increase the kern.ipc.shmmax tunable to at least 128MB, too."

    Tell me more about this kernipc.shmmax. My card specs say it's a 128 MB but all system info tools I run say it's 336 MB dedicated, before it uses shared. I actually want the video in my PC-BSD to use 1 gig of video ram (shared). How do I know it's using the shared ram from my system ram like it's supposed to? And why would turning max video memory down be helpful.. seems the opposite to me.

    I will check the AEI and get the Xorg log and the glxinfo log for you folks just as soon as my PC-BSD 9.0 beta 1.5 update finishes downloading and installing - should be later tonight when I can post it if not tomorrow morning.

    Thanks.
     
  8. Oxyd

    Oxyd New Member

    Messages:
    167
    Likes Received:
    0
    Nope. Desktop effects are desktop effects. Semantic Desktop is something else. KDE has this idea that it'll index your files and let you attach tags to them and whatnot. The end result that it goes over each and every one of your files in your $HOME until it manages to index them (indexing has never finished for me on my desktop, even when I let it run for two days).

    Anyway, go to System Settings → Desktop Search, and disable Nepomuk Semantic Desktop. Logout&login for best effect after that.
     
  9. xibo

    xibo New Member

    Messages:
    383
    Likes Received:
    0
    kern.ipc.shmmax is the maximal amount of shared memory that may be allocated. Shared memory is a means of inter-process communication that allows quick transfer of a large amount of data from one process (space) to (one or more) others. Excessive users of it are X11 and NFS, as well as some KDE application (klipper obviously, some others less obvious), VLC, and many other applications use it to a lesser extent.

    As Oxyd wrote, semantic desktop is a tagging system, which in KDE for the sake of becoming more "modern" in terms of resource usage, has been expanded by an indexing service (the most relevant performance-break of Windows Vista) called strigi, which searches your home directory for "interesting" elements, like chapter names in PDFs, to allow you to faster search files by content instead of names or other filesystem attributes. Obviously, such an index will be outdated once any file is modified, which causes strigi (like Vista's indexing service) to continuously keep indexing and wasting CPU time and memory and also causing annoying noises of non-sequential hard disk access, for a feature used rarely or not at all.

    The Radeon 4200 doesn't seem to be a "high end" adapter, so given the quality of ATI drivers, I would expect it to be as fast (or rather, slow) as a "entry-level" nvidia card. Unless of cause ATI decided to improve it's drivers, of cause.

    Less ranting, the shared memory (be it System V SHM or your graphics memory) allocated will no longer be available to use for applications, or at least not before it's paged away. As far as I know, Graphics Memory, like any other memory randomly accessed by hardware other then the CPU (DMA), cannot be paged - which means the more memory your video adapter consumes, the less memory is available your CPU, i.e. the OS and the applications it runs. The amount of shared memory usable by your video adapter _maybe_ is setupable in BIOS.
    I've managed to run KDE-4 on 16 MB of vram, but that was too little. My geforce 6800 has 256 MB and works just fine. Amounts in the range of gigabytes are only needed for 3D.
     
  10. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,180
    Likes Received:
    10
    Hold off on blaming the HD4200 and quality of ATI driver unless there's evidence. There are plenty of ways for KDE to be slow.
     
  11. ElectricRider

    ElectricRider New Member

    Messages:
    41
    Likes Received:
    0
    Thanks for the extra info folks.

    I did turn off semantic desktop.. this is exactly like MS Windows Indexing feature which I always turn off on all my windows products.

    The info about the kern.ipc.shmmax was interesting. Nice to know I have access to something that actually controls the shared memory unlike in Windows.. I do understand how shared memory works and that it's a trade off.

    I LOVE my shared memory in this laptop. For an example I have 4 gigs of Ram, and Windows at most takes up to 2 gigs. I run a lean windows system without Areo and extras that take video memory I don't need to be sure I have enough shared ram left over for games on this laptop. I can play Crysis, Borderlands, Fallout New Vegas, you name it.. all modern games smoothly with good framerate on at least all medium settings with this video chip and it's shared ram.

    That's what I bought this thing for.. to be a cheap gaming laptop, and it works for that awesomely. So while the ATI 4200 HD video may not be considered high end like my desktop ATI Radeon XFX 5750 1 gig dedicated ddr3 ram (a $250.00 card) using the shared ram it gets the job done nicely. That's the performance I want out of this chip in PC-BSD.

    I'm just waking up, let me finish my coffee and i'll post the files you guys suggested above.
     
  12. ElectricRider

    ElectricRider New Member

    Messages:
    41
    Likes Received:
    0
  13. kpa

    kpa Member

    Messages:
    3,995
    Likes Received:
    6
    Sysctls are examined and changed with sysctl(8). For example to change kern.ipc.shmmax to 128MB you would run (as root):
    # sysctl kern.ipc.shmmax=134217728
     
  14. adamk

    adamk New Member

    Messages:
    1,624
    Likes Received:
    0
    First, you're using the radeonhd driver. This is unmaintained and unsupported. Use the radeon driver instead.

    Second, you have the nvidia driver installed for some reason. Remove it.

    Third, glxinfo is part of graphics/mesa-demos. Once you fix those first two problems, install glxinfo, restart X, and show us your new /var/log/Xorg.0.log file and the output of glxinfo
     
  15. xibo

    xibo New Member

    Messages:
    383
    Likes Received:
    0
    Code:
    Section "Device"
        Identifier      "Card0"
        Screen           0
        Driver         "radeonhd"
        VendorName     "Radeon Video Driver"
        Option	   "XAANoOffscreenPixmaps" "true"
        Option	   "AccelMethod" "EXA"
        Option	   "DRI" "true"
        BusID      "PCI:1:5:0"
    EndSection
    Here are benchmarks with other ATI Cards: http://www.free3d.org/

    Appearently using AccelMethod XAA might be advantagous ;)
     
  16. adamk

    adamk New Member

    Messages:
    1,624
    Likes Received:
    0
    XAA doesn't accelerate anything on his GPU. In fact, I doubt it's even implemented.


    EDIT: While I'm thinking about it, lines 66-68 can all safely be removed from the xorg.conf file. 67 and 68 are defaults, and 66 is meaningless when using EXA.

    Adam
     
  17. ElectricRider

    ElectricRider New Member

    Messages:
    41
    Likes Received:
    0
    KPA Thanks for the info.. (MIB's) I knew the U.S. Government was involved in this somehow :)

    Er o.k. which is it EXA or XAA ?

    Why would the radeon driver be better than the radeonhd driver? Isn't the radeonhd driver more optimized for 3d acceleration?

    Er.. yeah I installed the nvidia drivers because I know some things on my mother board require nvidia drivers I didn't know the nvidia drivers option in setup was only for video.

    How do I "install glxinfo and restart X" ?
     
  18. adamk

    adamk New Member

    Messages:
    1,624
    Likes Received:
    0
    As I said above, EXA.

    I can't make it clearer than I already did:
    Definitely not. The only advantage to using radeonhd is that it supports HDMI audio without kernel modesetting.

    Errr... You install glxinfo by installing the graphics/mesa-demos port I already mentioned. You restart X by logging out of your X session and logging back into a new one.

    Adam
     
  19. ElectricRider

    ElectricRider New Member

    Messages:
    41
    Likes Received:
    0
    I removed the Nvidia driver.

    I do not have a radeon option in my display settings. The options i have are: ATI, ATI3denable, Intel, Intel3denable, mach64, nv, r128, radeonhd, radeonhd3denable, openchrome and vesa.

    I choose ATI3denable for right now.. is this o.k... is that my best choice? Asking before I move on to install the Mesa libraries. (which I will do from Freshports)
     
  20. adamk

    adamk New Member

    Messages:
    1,624
    Likes Received:
    0
    I have no idea what "display settings" you are talking about. You can simply create an xorg.conf file with 'Xorg -configure' or, most likely, run X without any xorg.conf file at all (assuming you have dbus and hald running). It will automatically select the radeon driver.
     
  21. ElectricRider

    ElectricRider New Member

    Messages:
    41
    Likes Received:
    0

    This is getting frustreting. In my PC-BSD control panel I have an option under Hardware where i can choose to reboot the PC to get to the display options - like you first see when you install the OS - so you can choose the display driver you want to use. Thats what I'm calling "display settings".

    Remember you are talking to a noob, so if you care to spell out for me exactly how to: " create an xorg.conf file with 'Xorg -configure' or, most likely, run X without any xorg.conf file at all (assuming you have dbus and hald running). ", I will be happy to try it..

    but that begs the question.. if the system is capable of choosing the best display driver for you.. why does it ask you at start up?

    I don't like this ati3denable driver - my clock and other things on the "task bar" is missing now.
     
  22. adamk

    adamk New Member

    Messages:
    1,624
    Likes Received:
    0
    Sorry, I have no experience with PC-BSD. Sounds like they've made quite a mess of things.

    Bring up a terminal and run 'pgrep hald'. If it shows various process IDs, simply remove /etc/X11/xorg.conf and reboot.

    Adam
     
  23. ElectricRider

    ElectricRider New Member

    Messages:
    41
    Likes Received:
    0
    o.k. I removed the xorg.conf and it's backup. I rebooted. I installed the mesa-demos library through the root terminal vie the info from freshports. i used the pkg.. it did not find a port version to install. It said done, but that i had an older version already installed.. it's not clear why it told me that.. it didnt say it actually overwrote it or anything.. I rebooted again. I looked in X11 and do not have a new xorg.conf file.
     
  24. ElectricRider

    ElectricRider New Member

    Messages:
    41
    Likes Received:
    0
    darn I still cannot edit massages. I wanted to say it's not that PC-BSD made a mess of things really.. they just made the layout different to it would be easier for new folks coming from Windows. I am sure if you install a copy of the beta 9.0 ver 1.5 and look around, you will see it's pretty much the same except for the layout and some terminology.

    Actually it would be nice to get a FreeBSD's users opinion on this.
     
  25. adamk

    adamk New Member

    Messages:
    1,624
    Likes Received:
    0
    It should not create a new xorg.conf. X should just be running with the correct default options. Please show us the new /var/log/Xorg.0.log file and the output of /usr/local/bin/glxinfo