Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been following the updates that appear every week in how they affect the performance and resource usage of Compiz since I installed 11.10 (Right now I am testing 12.04 and 14.04). For what I have seen, the CPU and memory usage have lowered (specially memory). I am comparing installing 12.04/14.04 without any updates and then applying all updates and also comparing 12.04 to 14.04. For example nautilus is using less than 35 MB (For me it was between 70 MB and 150 MB doing the same activities with it several versions ago).

Other processes have also received some kind of optimizations which have lowered my total memory usage from around 850 MB to 610 MB (I also use services like Apache, MySQL, etc..) but after all of this time, the only one that has stayed almost the same is Compiz. It still uses more than 100MB to start. Only using the desktop with Unity and no other programs running, it takes (right now) 133 MB. What options can I use to lower the memory footprint WITHOUT compromising the stability of Unity (For example removing the OpenGL plugin from Compiz config is a BAD idea).

What optimizations can be done to lower the memory usage of Compiz?

NOTE - I have Compiz Config Settings Manager (CCSM) installed already.

share|improve this question
    
Disable some Compiz plugins that you do not need. You can do this with compizconfig-settings-manager. sudo apt-get install ccsm then run ccsm. –  Anonymous Nov 25 '11 at 18:43
    
@Anonymous - I already have ccsm installed and as I mention the Unity plugin and OpenGL plugins in the question I thought there was no need to say I had it installed. Either way am asking what optimizations to do in ccsm, gconf or any other. –  Luis Nov 25 '11 at 18:50
    
+1 for the question Luis - since doing all the regular updates to 11.10 I can no longer use Unity on my netbook - worked fine before on a fresh install. It is only compiz slowing my system down as Unity 2D and Gnome Shell work perfectly..... –  Mark Rooney Nov 25 '11 at 22:30

2 Answers 2

up vote 9 down vote accepted

It is rather difficult in my experience to lower the Compiz memory usage. The best thing I can suggest to lower the texture quality in the OpenGL plugin, but this won't change much afaik.

Another source of compiz memory increases can be memory leaks. This seems to sometimes be triggered by indicators, but can be from other sources as well (not sure of them yet).

My solution as been to periodically restart unity, using a simple script that contains:

#kill compiz completely, including all child processes, freeing it's memory:
killall -9 compiz & 
#run unity and give you back a free terminal.
unity & disown 

I know this isn't the best of answers, so I'm following this question myself to see if anyone has better tips.

share|improve this answer
1  
Thanks Roland for the nice idea. –  Luis Dec 7 '11 at 16:25
1  
do you know how to restart compiz without screwing up the location of the windows in their workspaces. After I kill compiz all the windows move to the first workspace and I have to reorganize them, which is a pain –  ivotron May 28 '13 at 22:59
    
@ivotron unfortunately not. I'll seek a solution though. –  RolandiXor May 29 '13 at 5:02

A work around to the compiz memory leak is to :

sudo kill -HUP "compiz process id"

Not a great solution, but it frees up leaked memory without completely killing the process.

share|improve this answer
    
Not sure why this is downvoted. It worked great for me. (even though it reset a lot of window workspaces) –  dpb Nov 27 '13 at 16:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.