Unity , which was released with Ubuntu 11.04 has one glaring error with compiz. It has a memory leak!
So, if you leave your computer on for a long time , the memory consumption keeps on increasing . The bugs have already been reported to Canonical . You can view the bugs here , here and here . If you see that your computer is slowing down due to high usage of RAM , you can just press Alt + F2 and type in
unity --replace &
This will cause unity to reload thus resetting the memory usage to around 40 MB.
Note: Doing a unity –replace & will not log you off. But for safety of your data, always save the stuff you were working on before reloading unity.
As an addendum, when I tried this (Ubuntu 11.04, Unity, 64-Bit – left running for a couple of days) – compiz RAM usage before and after running “unity –replace &” was 464MB.
But… I then saw that I had a second compiz process which was using around 77MB. Killing the original “large” compiz process (ending it didn’t work) freed up the lost RAM with no detrimental or glitchy effect on the desktop.
Cheers!