Saturday, June 08, 2013

When Thunderbird Uses Too Much Memory

So I run Thunderbird on Linux, and the other day at work I noticed thunderbird taking up way too much memory—both virtual and physical, as top(1) showed:
top - 10:57:52 up  2:48,  2 users,  load average: 0.09, 0.08, 0.04
Tasks: 117 total,   2 running, 115 sleeping,   0 stopped,   0 zombie
Cpu(s): 14.3%us,  2.5%sy,  0.0%ni, 83.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    998152k total,   827696k used,   170456k free,    14308k buffers
Swap:  4192252k total,    11084k used,  4181168k free,   398176k cached

 4144 collin    20   0  760m 218m  32m R   23 22.5   7:31.57 firefox
 4097 collin    20   0  502m 185m  28m S    0 19.0   4:47.57 thunderbird
 1888 root      20   0 55352  17m 3960 S    8  1.8   2:11.66 Xorg
 4905 collin    20   0 38620  12m  10m S    0  1.2   0:00.88 notification-da
The above is from mh home computer, but at work thunderbird was showing something like 1680m virtual size, and the %MEM was something like 70.0. Way, way too high. Of course, it also made the computer run slower than molasses in January.

A web search led me to "Daifne"’s advice on—the short version of which is to

  • quit Thunderbird (probably kill(1) it to be sure), then
  • cd into the profile directory and
  • remove all files matching *.msf; then
  • restart thunderbird and
  • compact all folders (this last is optional if you've already got tbird configured to automagically compact folders frequently)
After doing all that, the memory numbers dropped dramatically, to about 1/3 their former values.

Amazing, really, how much easier some things are with the web. Of course the web is partly the cause of so much complexity. Is that dialectical?

No comments: