Find the answer to your Linux question:
Results 1 to 5 of 5
Is there any way to make sure the system & GUI has priority over user processes? It happens to me a couple of times a week that a couple of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2012
    Posts
    2

    User Processes "freeze" Desktop


    Is there any way to make sure the system & GUI has priority over user processes? It happens to me a couple of times a week that a couple of badly behaved processes will take up so much resources that the gui is essentially locked and I can't even kill the processes.

    That is, if I move the mouse on my desk back & forth several times, a couple of minutes later the mouse pointer on my screen will move a bit. Obviously it's hard to hit the "Close" button with a mouse like that.

    This happens with various programs when they are taking a lot of resources -- chromium web browser, NetBeans, etc.

    I have a modest but not too bad computer, dual core processor, 4gb memory. Ubuntu 12.04 LTS, 64-bit.

    Any ideas how to prevent/deal with this? I am surprised this condition happens at all.

    Thanks,

    Chris

  2. #2
    Linux Newbie hagfish52's Avatar
    Join Date
    Dec 2011
    Location
    Asheville, NC
    Posts
    225
    I don't know how to make the system do what you want by tweaking the OS, but one solution might be to add some more physical memory to the machine, like maybe increase the 4 GB you have to 8 GB.

  3. #3
    Linux Newbie hagfish52's Avatar
    Join Date
    Dec 2011
    Location
    Asheville, NC
    Posts
    225
    Ordinarily 2 GB per processor core is enough so actually I am surprised that your 4GB isn't handling the load. You may wnat to run "memtest" or some other memory testing application to make sure all of your installed memory is working correctly.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Jul 2008
    Posts
    4,201
    What does
    Code:
    top
    in terminal say about your siituation?

    Ram, processes, and cpu usage shows in top. Example

    Code:
    top - 20:44:29 up  1:51,  0 users,  load average: 1.30, 1.39, 1.21
    Tasks: 107 total,   1 running, 104 sleeping,   0 stopped,   0 zombie
    Cpu(s): 10.3%us,  6.0%sy,  0.0%ni, 83.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
    Mem:   2064780k total,   617676k used,  1447104k free,     9056k buffers
    Swap:        0k total,        0k used,        0k free,   315696k cached
    
    PID USER * * *PR *NI *VIRT *RES *SHR S %CPU %MEM * *TIME+ *COMMAND *
    20884 root      20   0 37344 9.9m 5660 S  3.0  0.5   0:52.70 Xorg               
    29623 harry     20   0 32720  10m 8880 S  2.0  0.5   0:00.52 roxterm            
    20928 harry     20   0 76104 3440 2528 S  1.3  0.2   0:18.51 conky              
    21066 harry     20   0 75196 3976 3064 S  1.3  0.2   0:17.83 conky              
    29756 harry     20   0  2632 1112  848 R  0.7  0.1   0:00.06 top                
        3 root      20   0     0    0    0 S  0.3  0.0   0:00.89 ksoftirqd/0        
        1 root      20   0  2228  680  588 S  0.0  0.0   0:01.30 init               
        2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd           
        5 root      20   0     0    0    0 S  0.0  0.0   0:01.41 kworker/u:0        
        6 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0        
        7 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 cpuset             
        8 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 khelper            
        9 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 netns              
       10 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 pm                 
       11 root      20   0     0    0    0 S  0.0  0.0   0:00.09 sync_supers        
       12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 bdi-default        
       13 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kintegrityd

  6. #5
    Just Joined!
    Join Date
    Aug 2012
    Posts
    2
    I didn't run top the last time, but I had the system monitor open, and memory use was high -- but not over the amount of memory I have -- it said something like "3.2 of 3.7 GB"

    But the two CPU's were running both at 100%. It also said the swap usage was ".25 GB of .25 GB", which seems like a ridiculously small swap partition size, but if I'm using less than 100% of available memory, I would have thought that wasn't an issue. Maybe I'm wrong about that?

    But I would have thought the OS could be set to reserve more or less of the system resources for the kernel and GUI. If it's configured as a real-time controller, obviously you want to let the real-time application take all the resources it needs, but if it's an ordinary workstation, I would think it would be possible to set the system to keep some control.

    It shouldn't be a matter of more memory -- you can always have a badly behaved process that has an infinite for loop and mallocs 100GB of memory. I don't care about how many badly behaved processes I have running at once -- I would expect the OS to be able to limit them somehow. Even XP does that.

    Is there no way to set default execution priority of the system significantly higher than the execution priority of standard applications? I would have thought that was a configuration setting or something.

    Anyway, thanks for the feedback.

    Chris

Posting Permissions

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