
Hi All, Running Thunderbird 15.0.1 on Ubuntu 10.4 (Please don't suggest changing my email client or Linux to your current favourites.) Thunderbird is doing a major re-indexing of messages, which is really pushing my CPU to its limits. (i.e. getting over 60C core temperature, email process using 100-160% of CPU usage - dual core CPU) Full details of my hardware, and the CPU usage are documented here: http://forums.mozillazine.org/viewtopic.php?f=31&t=2399189 That was this time last year. Doing the same thing now with my updated version of TB. (Only happens for a couple days, once a year, when I shift all my Sent messages of the previous calendar year to an "archive" folder.) Could any of you point me to instructions to get Ubuntu to limit or choke the demand that the Thunderbird process calls upon the CPU? Thanks =very= much. Carl Turney Bayswater

Hi Carl
Running Thunderbird 15.0.1 on Ubuntu 10.4 (Please don't suggest changing my email client or Linux to your current favourites.)
10.04 is very old though (almost 3 years now), and no longer receives even security updates - hasn't for over a year. So just upgrading Ubuntu would be a good idea. But that's as an aside.
Thunderbird is doing a major re-indexing of messages, which is really pushing my CPU to its limits. (i.e. getting over 60C core temperature, email process using 100-160% of CPU usage - dual core CPU)
Full details of my hardware, and the CPU usage are documented here: http://forums.mozillazine.org/viewtopic.php?f=31&t=2399189
That was this time last year. Doing the same thing now with my updated version of TB. (Only happens for a couple days, once a year, when I shift all my Sent messages of the previous calendar year to an "archive" folder.)
Could any of you point me to instructions to get Ubuntu to limit or choke the demand that the Thunderbird process calls upon the CPU?
I use the following script to run RuneScape (a game implemented in Java) on Linux. It figures out how many cores a machine has, and then binds the process to all-but-one. It's not perfect, but as long as you don't do this with more of your apps, it tends to have the desired effect. Script pasted below, adapt to your needs / use as a template for what you need. (for the bash experts among the LUV readers - I'm not one of you so I'm certain the above is less than efficient. It does, however, do the job) === #!/bin/bash # 2012-05-21 by Arjen Lentz <a r j e n (at) l e n t z (dot) c o m (dot) a u> # Note: the following is Linux specific # requires bash 4, taskset, /proc/cpuinfo, egrep, wc # Binding a process to all but N cores using taskset # (note that core numbers are 0 based) # taskset -c 0,1,2 can also be written as -c 0-2 # taskset is either followed by a commandline to start, or --pid N # set this to 1, or higher if you need more spare cores SPARECORES=1 # if successful TASKSET_CMD will contain something like # "/usr/bin/taskset -c 1-3" # If not, TASKSET_CMD will be an empty string. CPUINFO="/proc/cpuinfo" TASKSET_CMD="" # extended grep tool so we can use a decent regex EGREP=`which egrep` if [[ -z $EGREP ]]; then echo "egrep command not installed, skipping taskset" else # wordcount tool WC=`which wc` if [[ -z $WC ]]; then echo "wc command not installed, skipping taskset" else # taskset tool TASKSET=`which taskset` if [[ -z $TASKSET ]]; then echo "taskset command not installed" else if [[ -a $CPUINFO ]]; then # NCORES will be set to the actual number of cores NCORES=`$EGREP "^processor\s" $CPUINFO | $WC -l` if [[ $NCORES > $SPARECORES ]]; then echo "Detected $NCORES CPU cores, keeping $SPARECORES spare" # TASKSET_CMD will set to all except SPARECORES TASKSET_CMD="$TASKSET -c $SPARECORES-$((NCORES-1))" # following echo is just for debug purposes # echo $TASKSET_CMD ... else echo "Detected cores $NCORES <= $SPARECORES requested, skipping taskset" fi else echo "$CPUINFO not found, skipping taskset" fi fi fi fi JAVA=`which java` # initial and maximum amount of memory the Java process is allowed to allocate # note that in the 64bit section below, maxmem is raised INITMEM=1000M MAXMEM=2500M # Default to 32-bit environment, as that always works JAVAOPTS="-server -d32 -Xms$INITMEM -Xmx$MAXMEM -XX:+UseParallelOldGC -XX:ParallelGCThreads=1 -XX:+DoEscapeAnalysis" # uname tool UNAME=`which uname` if [[ -z $UNAME ]]; then echo "uname command not installed, so can't check architecture - defaulting to 32-bit" else ARCH=`$UNAME -m` if [[ $ARCH = 'x86_64' ]]; then echo "Architecture $ARCH, selecting 64-bit environment" MAXMEM=3000M JAVAOPTS="-server -d64 -Xms$INITMEM -Xmx$MAXMEM -XX:+UseParallelOldGC -XX:ParallelGCThreads=1 -XX:+DoEscapeAnalysis -XX:+UseCompressedOops" else echo "Architecture $ARCH, defaulting to 32-bit" fi fi RUNESCAPEDIR="$HOME/runescape" CLASSPATH="$RUNESCAPEDIR/bin/jagexappletviewer.jar" CONFIG=$'http://www.runescape.com/k=3/l=en/jav_config.ws' LOGFILE=$RUNESCAPEDIR/runescape.log CMDLINE="$TASKSET_CMD $JAVA $JAVAOPTS -Djava.class.path=$CLASSPATH -Dcom.jagex.config=$CONFIG jagexappletviewer ./images" echo >>$LOGFILE echo >>$LOGFILE ===== echo >>$LOGFILE `date` echo >>$LOGFILE $CMDLINE echo >>$LOGFILE # we cd to this dir so any Java segfault logs will also be contained there # (rather than getting lost in homedir) cd $RUNESCAPEDIR $CMDLINE >>$LOGFILE 2>&1 === -- Exec.Director @ Open Query (http://openquery.com) MySQL services Sane business strategy explorations at http://upstarta.com.au Personal blog at http://lentz.com.au/blog/

Hi Carl
Running Thunderbird 15.0.1 on Ubuntu 10.4 (Please don't suggest changing my email client or Linux to your current favourites.)
10.04 is very old though (almost 3 years now), and no longer receives even security updates - hasn't for over a year. So just upgrading Ubuntu would be a good idea. But that's as an aside.
Pls ignore that bit, my bad. 10.04 was an LTS release and thus still supported. Cheers, Arjen. -- Exec.Director @ Open Query (http://openquery.com) MySQL services Sane business strategy explorations at http://upstarta.com.au Personal blog at http://lentz.com.au/blog/

On Thu, Jan 10, 2013 at 11:58 AM, Arjen Lentz <arjen@lentz.com.au> wrote:
Hi Carl
Running Thunderbird 15.0.1 on Ubuntu 10.4 (Please don't suggest changing my email client or Linux to your current favourites.)
10.04 is very old though (almost 3 years now), and no longer receives even security updates - hasn't for over a year. So just upgrading Ubuntu would be a good idea. But that's as an aside.
Pls ignore that bit, my bad. 10.04 was an LTS release and thus still supported.
Well, yes, but only until April on the Desktop. I'd still be planning on upgrading to 12.04 if you like the LTS variants. / Brett

Brett Pemberton writes:
Arjen Lentz wrote:
10.04 was an LTS release and thus still supported. Well, yes, but only until April on the Desktop.
As always, let me point out that -- at least according apt -- support is on a per-package basis. "supported on the server" means they support specific packages, not whatever you happen to run on YOUR ubuntu server. Checking with "grep-aptavail -sSupported -XP foo", some random packages: Package Ubuntu Support (for lucid) ============ ========================== thunderbird 3y evolution 3y mutt 5y collectd - etckeeper 5y bzr 5y git-core 3y openssh-server 5y dropbear - lsh-server - libapache2-mod-php5 5y libapache2-mod-perl2 5y libapache2-mod-ruby - libapache2-mod-fgcid - perl 5y python 5y python3 3y ruby 5y lua5.1 18m The cron job below I created to warn me when stuff gets EOLd by Ubuntu, but I had to turn it off because it warned about so much stuff: http://cyber.com.au/~twb/snarf/vtwb

On Thu, 10 Jan 2013, Carl Turney <carl@boms.com.au> wrote:
Thunderbird is doing a major re-indexing of messages, which is really pushing my CPU to its limits. (i.e. getting over 60C core temperature, email process using 100-160% of CPU usage - dual core CPU)
If a system has no hardware faults and is running in a suitable environment then it should be able to sustain 100% use on all CPU cores indefinitely. If the system gets too hot in such use (as my Thinkpad T61 does) then the hardware is at best badly designed and probably just broken. As an aside modern CPUs change CPU frequency as appropriate (the command cpufreq-info gives you information on this) and some of them are designed to run at unsustainable speeds for short periods of time. My T61 will have core temperatures well in excess of 60C when idling (system load average well below 0.5) in an environment that isn't particularly warm (ambient temperature well below 25C) and which has reasonable ventilation (sitting on a flat table with no vents obscured). I believe that my T61 is broken in some way, but it works well enough that I haven't felt the need to pay to get it fixed. Anyway core temperatures well in excess of 80C at times when there's high ambient temperatures (EG 30C+) or moderate load (any reasonable compile) haven't seemed to hurt my Thinkpad. While it would be nice to be able to limit an application to some portion of CPU time you haven't given us any reason to think there's a real problem here. 60C shouldn't be a big deal. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

Carl Turney <carl@boms.com.au> wrote:
Could any of you point me to instructions to get Ubuntu to limit or choke the demand that the Thunderbird process calls upon the CPU?
This won't help you (but it might be of interest to others): the Systemd developers have been working on this. In particular, since every user session or system daemon occupies its own container, it's possible to limit CPU time and other resources of the appropriate container in order to control over-all usage. Thus in theory (and probably in practice - I don't have a machine with Systemd installed) you could limit the CPU time allocated to your X session, or perhaps it's possible to run Thunderbird in a different container.

On 10/01/13 10:42, Carl Turney wrote:
Thunderbird is doing a major re-indexing of messages, which is really pushing my CPU to its limits. (i.e. getting over 60C core temperature, email process using 100-160% of CPU usage - dual core CPU)
Could any of you point me to instructions to get Ubuntu to limit or choke the demand that the Thunderbird process calls upon the CPU?
The program cpulimit (http://cpulimit.sourceforge.net/) might help. The way it works is a bit crude (using SIGSTOP/SIGCONT), but it is useful in the occasional situations. It can do such things as limit a particular process, for example, to 50% of the CPU usage. cpulimit -l 50 -e thunderbird-bin http://www.howtoforge.com/how-to-limit-cpu-usage-of-a-process-with-cpulimit-... regards, Glenn -- sks-keyservers.net 0xb1e82ec9228ac090

Hi, On 10/01/2013 10:42 AM, Carl Turney wrote:
Thunderbird is doing a major re-indexing of messages, which is really pushing my CPU to its limits. (i.e. getting over 60C core temperature, email process using 100-160% of CPU usage - dual core CPU)
I think Thunderbird *really, really, really* needs to have better mail store options like Maildir, instead of large files per folder. There's been some talk about this, but I don't know if anything eventuated and TB is in a lesser development state which makes it less likely to help it get some real improvements. If the mail store was plug able (as talked about), then performance of TB should be greatly improved and not just at indexing time. Cheers A.

On 10/01/13 14:31, Andrew McGlashan wrote:
I think Thunderbird *really, really, really* needs to have better mail store options like Maildir, instead of large files per folder. There's been some talk about this, but I don't know if anything eventuated and TB is in a lesser development state which makes it less likely to help it get some real improvements.
I (accidentally) solved that by storing all my local folders via a local IMAP server (dovecot, which uses Maildir) rather than using files directly. The idea (back in 2010) was that I could likely swap to Kmail in future once its Caldav had improved without worrying about the folder/message formats. cheers, Chris -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC

On 10/01/13 10:42, Carl Turney wrote:
Could any of you point me to instructions to get Ubuntu to limit or choke the demand that the Thunderbird process calls upon the CPU?
Sounds like a job for control groups to me.. http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt The cpu subsystem is likely what you want. Check to see if the cgroup-bin package is available in 10.04 (it is in 12.04) as that may make things easier (no guarantees, I've never touched that part of it). Best of luck, Chris -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC

On Thu, 10 Jan 2013, "Trent W. Buck" <trentbuck@gmail.com> wrote:
Prior to that, I recommend investigating nice, ionice and ulimit, but these are probably too coarse-grained for something like tbird.
ulimit allows a process to be killed when it uses too much CPU time, this isn't good when you want the job to be completed. nice and ionice are generally only good when there are multiple processes and you want to have relative priorities. The problem as described is a desire to have CPU power go unused which won't be addressed by this. On Thu, 10 Jan 2013, Chris Samuel <chris@csamuel.org> wrote:
Could any of you point me to instructions to get Ubuntu to limit or choke the demand that the Thunderbird process calls upon the CPU?
Sounds like a job for control groups to me..
http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt
The cpu subsystem is likely what you want.
That documentation only seems to refer to limiting the number of CPUs in use (although it's very complicated and I probably missed some things). That doesn't seem to help. The program that periodically uses sigstop/sigcont seems like a good option, but I think that the real problem as desired isn't something you want to solve. Modern CPUs are designed to run at temperatures a lot hotter than 60C, we just have to deal with it. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

Modern CPUs are designed to run at temperatures a lot hotter than 60C, we just have to deal with it.
Disagree. For some background tasks I'd much rather my laptop kept temperatures down and took a bit longer than get it done quick - the thing sounds like a jet engine when it starts to work hard, especially with the weather we've been having lately. For important tasks (eg something I explicitly run and want done now), I'm prepared to put up with the noise, but not for some background indexing operation that I'm not particularly fussed with. Windows can deal with such things, there is no reason why Linux should have to have a hard time of it. James

Russell Coker writes:
The problem as described is a desire to have CPU power go unused which won't be addressed by this.
I missed that point.
The program that periodically uses sigstop/sigcont seems like a good option, but I think that the real problem as desired isn't something you want to solve.
+1; might also be feasible to set a CPU frequency governor such that it isn't allowed to hit high frequencies, or is forced into powersave mode (with hysteresis guards, of course) if the temperature gets too high.

On 10/01/13 18:34, Russell Coker wrote:
That documentation only seems to refer to limiting the number of CPUs in use (although it's very complicated and I probably missed some things). That doesn't seem to help.
Yeah, it's not great, but it can do what you want in conjunction with CFS (the completely fair scheduler, which is the default). See this: https://lwn.net/Articles/465074/ It's not on the kernel.org/doc/ site for some reason, but it is in git all the way back to 2.6.32: http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob_pla... cheers, Chris -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC

Hi, Thanks to all, for their suggestions on this post of mine. Half of the responses I understood, half were above my head. Fortunately, Thunderbird finished all it's re-indexing. So CPU demand is back down to normal. But I'll save your ideas, and implement some of them before January next year (when this is likely to reoccur) or before I run Handbrake or Transmageddon again. I'll also be upgrading to Ubuntu 12.4 some time between now and April, when the LTS runs out. Maybe to Mint (as I like Gnome) if Mint also has LTS for 3-5 years. (Then again, maybe I'm misunderstanding the whole Distro phenomenon.) While waiting for your responses to this post, I took the lid off my tower case and pointed a small house fan at the motherboard. CPU temp dropped from 60C down to 35C in a couple of minutes. Hmm. All vents are clear, heat-sinks are clean, and fans are spinning. Maybe the case just wasn't designed for heavy workloads in Melbourne summers. A couple years ago, I spent many frustrating hours trying to find out the max safe temp for my CPUs. Somewhere, somehow, I =finally= stumbled across the following and saved it to disk. Hence my concern when it hits 60C.
Intel Pentium D 930 Core Presler No.Core 2 Frequency 3000 MHz L1 cache 12 KB + 16 KB L2 cache 2048 KB L3 cache 0 KB Socket 775-FCLGA6 Technology 65 nm FSB 200 MHz HT/QPI/DMI 800 MHz Voltage 1,225-1,325V TDP 95 W OEM HH80553PG0804M BOX BX80553930 BX80553930 BX80553930 Steep B1 C1 Max. temp. 63°C Date 2006-01-05 QEZJ QJZB QMVD SL8WR SL94R SL95X
BTW Also worked up a quick cheap ugly but effective kludge (but I repeat myself) for cooling my laptop: Get a clean empty pizza box of appropriate size. Map out critical air vents on bottom of laptop. Cut out corresponding holes on lid of pizza box. Cut out a similar total area of holes on back "hinge" edge of pizza box for intake/exhaust. Cheers, Carl On 10/01/13 10:42, Carl Turney wrote:
Hi All,
Running Thunderbird 15.0.1 on Ubuntu 10.4 (Please don't suggest changing my email client or Linux to your current favourites.)
Thunderbird is doing a major re-indexing of messages, which is really pushing my CPU to its limits. (i.e. getting over 60C core temperature, email process using 100-160% of CPU usage - dual core CPU)
Full details of my hardware, and the CPU usage are documented here: http://forums.mozillazine.org/viewtopic.php?f=31&t=2399189
That was this time last year. Doing the same thing now with my updated version of TB. (Only happens for a couple days, once a year, when I shift all my Sent messages of the previous calendar year to an "archive" folder.)
Could any of you point me to instructions to get Ubuntu to limit or choke the demand that the Thunderbird process calls upon the CPU?
Thanks =very= much.
Carl Turney Bayswater _______________________________________________ luv-main mailing list luv-main@luv.asn.au http://lists.luv.asn.au/listinfo/luv-main

Carl Turney <carl@boms.com.au> writes:
I'll also be upgrading to Ubuntu 12.4 some time between now and April, when the LTS runs out. Maybe to Mint (as I like Gnome) if Mint also has LTS for 3-5 years. (Then again, maybe I'm misunderstanding the whole Distro phenomenon.)
FTR, Ubuntu 12.04 includes Gnome, it just defaults to Unity. Cinnamon (GNOME3 + a conventional desktop metaphor) from Mint is also available in (Debian and) Ubuntu as at raring, which will be 13.04.

On Fri, 11 Jan 2013, Carl Turney <carl@boms.com.au> wrote:
A couple years ago, I spent many frustrating hours trying to find out the max safe temp for my CPUs. Somewhere, somehow, I =finally= stumbled across the following and saved it to disk. Hence my concern when it hits 60C.
Intel Pentium D 930 Max. temp. 63°C
It sounds like your heat-sink isn't seated properly or the cooling fan has something wrong with it. You could get some new heat paste and reseat the heat-sink and try to get it working better or just buy a new heat-sink. But really it's probably not worth it. A Pentium D was never a great CPU, it is very power hungry and not nearly as fast as more recent 64bit CPUs. http://www.graysonline.com/lot/0018-411020/computers-and-it-equipment/dell- inc-optiplex-780-small-form-intel-r-core-tm-2-duo-cpu-e8400-3-00 I've got systems with better CPUs from piles of junk that were destined for e- waste recycling. If you don't have access to such junk piles then you could go on Grays Online and buy the cheapest system on sale and get something a lot better than what you currently have. The above system which is now at $24+postage and 15% auction fee would be way better than your current system. http://www.graysonline.com/computers-and-electronics/computers-and-it- equipment The above URL has links to all the current Grays computer auctions. Make sure that the items you bid on don't have any faults listed and that they can be delivered to you. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/
participants (10)
-
Andrew McGlashan
-
Arjen Lentz
-
Brett Pemberton
-
Carl Turney
-
Chris Samuel
-
Glenn McIntosh
-
James Harper
-
Jason White
-
Russell Coker
-
trentbuck@gmail.com