Lowering Compiz memory usage
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.
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.
I know this is an old post, but Gus's answer helped me and I'd like to add to it. This is what I did (on Ubuntu 12.04):
- Alt+F2 (run application)
- Scheduled Tasks
- New recurrent task
killall compiz -HUP
- Every day at 00:00
Now compiz will be restarted automatically every night, without having to know the process id.
My problem was that if I left my screen locked for a few days, it took ~30 seconds to open the screen lock, and compiz memory usage was around 1000 MB.