Thunderbird:Testing:Memory Usage Problems
Contents
Thunderbird performance (slowness) can be affected by CPU, memory and disk activity from many sources. Please step through the full list below to have the best possible chance of success. You are likely frustrated, so the steps are simplified to be clear and easy to follow.
Diagnosis
Before starting
- Many steps are temporary *tests*, not a request for you to forever disable a feature. Disabling antivirus software for example.
- Do not delete files. Instead, rename or move files because we may need "bad files" later for developers to examine.
- As you go through the steps, collect the information you will need to later report a problem:
- When referring to memory, cpu, amount of time, numbers of folders and messages, etc, provide numbers for quantities, not vague words like fast/slow, small/large.
- List account types (imap, pop, rss, etc) from Help | More Troubleshooting Info.
- Provide full Thunderbird version number from Help | About.
- State precisely when the behavior occurs (startup, shutdown, or "normal operation"), and every step (action, menu click, ...) needed to reproduce the problem.
- Cite the step numbers of this document that you tested, and any which helped or didn't help improved your issue. Also bug numbers, URLs of postings and references you used.
- Whether your Thunderbird profile data is in a non-standard location.
- Screen shots can be helpful.
Diagnosis Steps
- Are you using the newest Thunderbird? (Versions are listed at releases. The newest version there should match to your Help | About. If check for Updates doesn't get you to that version, then download it from thunderbird.net.)
- Start Thunderbird in Troubleshoot Mode. If Troubleshoot Mode helped, then start in normal mode - if the problem returned:
- Visit Tools | Add-ons - disable one or two add-ons, themes or language packs at a time to determine which might be causing the problem
- Are any Add-on items in the list of Problem Extensions?
- Contact the author of suspected bad add-ons using their support website or email.
- Start OS in safe mode. Instructions: win10, win8, win7, MacOS. If performance is improved in safe mode, then
- check for newer version of AV/firewall software, and check with vendor's support site for problem reports
- test with antivirus disabled or removed - because we constantly see reports of antivirus causing slowness, and disabling isn't always reliable. See AV performance issues for examples, settings and helpful information.
- on Windows, especially Windows 10, try disabling MS-Windows Search (see next numbered item below)
- test with firewall disabled or removed Ad-Aware example
- any software loaded at boot time is a possible cause
- run only one antivirus, one firewall, one malware (never multiples of each - more is not better)
- on Mac, try with Time Machine disabled
- uninstall Thunderbird, then DELETE the Thunderbird PROGRAM directory (not the data directory), then download, reinstall, and retest Thunderbird. If using beta get it from channels.
- Do you have Calendars? Try disabling one at a time. And if you have many recurring, never ending calendar appointments try reducing the length and number of them. Less likely starting with version 128 and the fix for bug 1844408. Examples: [1], [2]
- If you have gmail accounts, is problem gone after unsubscribing the "All Mail" folder?
- On Windows, did you move the Thunderbird profile or any Thunderbird account from the default location "%APPDATA%" to a different Windows directory? If yes, then MS-Windows Search will attempt to index all Thunderbird disk activity. Disable Windows indexing for your Thunderbird data.
- If Thunderbird memory usage is more than expected by hundreds of megabytes (MB), then perhaps one or more folders (internally a database) are not being closed or corrupted. Please :
- Get a diagnostic log of Thunderbird activity with MSGDB:5,timestamp using logging instructions.
- File a bug, then edit the new bug and attach the zipped log file using "Add an attachment".
- Does setting Thunderbird to offline mode help, which stops checks for new mail and certain other activity? File | Offline | Work Offline - Work Offline should be "checked".
- If Offline did not help, do File | Offline | Work Offline - Work Offline should now be "unchecked".
- If Offline helped, then go back Online (disable Offline) and ...:
- Does disabling interval checks for new mail help? (Account Settings | Server Settings | uncheck "Check for new messages every N minutes"). If it helps, then ... is a low value (1-3 minutes) specified for checking for new mail? Does increasing it to 5-10 minutes help?
- Is a low value (1-3 minutes) specified for draft autosave at Options | Composition | General | Auto Save every N minutes. Does increasing it to 5-10 minutes help?
- What type of mail account is this (imap or pop), and how many other accounts are the same type?
- Are you absolutely certain that antivirus software is not to blame?
- Are any non-Inbox IMAP folders configured to check for new messages via "always check this folder" in properties? Or is hidden preference mail.check_all_imap_folders_for_new set to true? These increase load on both Thunderbird and the mail server. bug 729504
- Does problem resolve by disabling Global Search indexing? Tools|Options|Advanced|General| uncheck Enable Global Search and Indexer (linux: Edit|Preferences|Advanced|... Mac: cmd , advanced tab) and restart Thunderbird. (note, disabling indexing also disables searching)
- If problem did not go away, or to recheck indexing behavior, enable the checkbox again and restart Thunderbird.
- If the problem did go away - did Thunderbird have extremely high disk IO, seem to be stuck on indexing per Tools|Activity Manager, or is global-messages-db.sqlite (file used for global search) in your profile folder too big? Rule of thumb - the file should not be more than 10-20% of the combined size of all messages in directories Mail and ImapMail.
- Rename global-messages-db.sqlite (to keep it for later diagnosis), enable the Global Search checkbox, and restart Thunderbird. global-messages-db.sqlite will rebuild and your system load may be high until all your messages are reindexed, but your messages should not redownload from the server.
- Please file a bug about your problem.
- Are any folders greater than 2GB in size? Large folder indexes take more memory and time to load. Use Properties by right+clicking folder. Also Help | Troubleshooting lists large folders.
- Are any of these indexing methods enabled in Thunderbird:
- MS-Windows Integrated Search enable/disable at Tools|Settings|General|System Integration|Allow Windows Search [3], [4], [5], [6], [7], [8], [9], [10]
- MS-Windows Search service try disabling, especially with Windows 10, bug 1436278, or if you moved Thunderbird profile or account from the default location [11], [12], [13]. If that helps, you can disable Windows indexing for your Thunderbird data.
- Mac Spotlight at Thunderbird|Settings|System Integration
- Do you have thousands of contacts in your address book? (possible related issues: google contacts add-on], [14]
- Do you see "Unresponsive Script" or "Not Responding"? If you do, is Thunderbird whitelisted in your antivirus software? If whitelisting didn't help, set javascript.options.mem.log to true and provide a couple log entries of the form CC(T+1186.6) collected: 131 (131 waiting for GC), suspected: 98, duration: 274 ms.
- Has a proxy ever been defined, and is it working correctly or was the proxy removed? (A proxy can cause "Unresponsive script")
- If you see high CPU usage on Windows, check taskmgr to see if mozilla updater.exe or Window's update process is running.
- Is your Thunderbird profile or any part of Thunderbird not on a local hard drive? If not local, does it preform better when it is moved to the local disk?
- Cloud storage is not supported.
- USB drives are slower compared to a local disk. Some types or manufacturers are terrible. Make sure you've got a good one.
- network drive can be slow due to network transmission or slow media (SMB, NFS, AFS, samba)
- SSD? (sounds silly, but some SSD have been reported to be slow)
- If you suspect slow disk or high disk activity
- check the previous item (NFS, etc)
- in Windows you want at least 20% free disk space and do defrags
- check whether any OS or application update process is in progress, for example Windows update
- How many virtual folders have you created?
- If you have newsgroup accounts, then in Account Settings|Server Settings try disabling "Check for new messages at startup". If problem is gone you may be seeing many newsgroups with many unread messages, bug 185634, bug 541001, or [15].
- If you have RSS news reader account, do you have "Automatically create tags from feed category names" enabled? [16]
- If you have RSS news reader account, in Account Settings|Server Settings disable "Check for new messages at startup". If problem is gone you may be seeing something like bug 551144 (fixed in version 13).
- Any Outlook or Hotmail accounts? bug 1355885
- Is filter logging enabled at Tools > Filters? (large logs cause high overhead)
- Do you use server side message filters to place messages in folders? bug 589310
- Check activity in Tools > Activity Manager to see if ISP (mail provider) is being lame. Examples: Yahoo and Gmail (and others) may cause message folders to be redownloaded. slow downloading email (Centurylink)
- Common resource requirements, hardware checks:
- Do you have the minimum hardware requirements, and enough memory? Note, minimum or recommended sized system may not be sufficient for your Thunderbird and total system's workload.
- Consider hardware or virtualization problems [17], [18]
- Check BIOS settings: [hanging when sending messages if VT-x is enabled in BIOS]
- If Thunderbird is running in a VM (virtual machine), does it run much better when running not virtualized?
- Common folder maintenance steps - Are your folders well maintained, "too large", or perhaps broken:
- Do you see high memory or long delay when opening a specific folder? Or when moving message to a specific folder?
- Do any folders lose their sort order or column settings?
- Do you empty trash and junk on a regular basis? Large folders will cause performance issues [19], and you should not use these folders for long term storage. Does performance improve if you empty them? (see File menu, bug 1192827)
- Do any Inbox or filtered folders have several thousand messages? If so, especially for Inbox, consider moving some messages to another folder. Perhaps use Archive.
- Are compacts routinely performed? Compact must be automatic, or done regularly (daily or weekly) using manual File > Compact Folders?
- Are you using Linux?
- A package might be causing the problem [20]
- Are you running an old version of linux, consider updating. hangs on Ubuntu 10.04, 14.04 works
- If you have a reportable problem or question, please use the next section below.
Report a problem
Provide all the information you have collected plus the URL to a performance profile which you create in one of the following:
- An existing bug report that matches your problem. Check the curated bug list in this document or list of open performance bug reports.
- Create a support request or new bug report.
References
"Not Responding" - Examples: BTTray.exe, (Plusnet Protect/McAfee), McAfee, WSS, Windows Search Indexing and [21], McAfee, McAfee, McAfee (2013) Solutions: use XP3 compatibility mode in Windows 8 (Endicott), use XP3 compatibility mode (missychrissy), use XP3 compatibility mode (WaddyT/2013), use XP3 compatibility mode in Windows 8 (kgcode)
"Unresponsive Script" - Examples: Solutions:
Unresolved bugs and references:
- McAfee antivirus is causing major performance and problems with TB24 (and was with TB17 and TB16). Symptom: slow delete and read, "Unresponsive Script", "(Not Responding)". Solution
- bug 1342054 - Large number of tags causes very bad tags preference UI performance, from autotaging RSS feeds with "Automatically create tags from feed category names"
- bug 1438317 - "Indexing messages. Determining which messages to index" stuck on local folder never ends. Modest CPU - 7-10%. Error console "Observed header that claims to be gloda indexed but that gloda has never heard of during compaction"
- bug 1406653 - Gloda warning repeated every half-second causing high cpu and slow response. "Observed header that claims to be gloda indexed but that gloda has never heard of during compaction" in error console and "Determining which messages to index""
- bug 1240722 - tidybird add-on causes files/folders to be opened and stay open twice - Thunderbird leaks file descriptors (mostly .msf files) like a sieve causing high memory. (no virtual folders)
- bug 929281 - Long startup and "Unresponsive Script" with many pop accounts with version 24 (regression in TB18)
- bug 764306 - When trying to scroll large folders or switch some folders the application beachballs with high CPU (xref: bug 872869)
- High mem usage, increasing with every delete. No bug report. Solved by right+click, compact.
- bug 632791 Gloda (Global Search) indexes one message per minute with high CPU. Excessively sized global-messages-db.sqlite caused by buggered, excessively sized offline store. [because offline folder storage has many duplicate messages. but it should not]
- bug 563677 HTML Mail View slow (45++ sec) for pop and local folders - speed up FolderUriForPath (from bug 545126)
- bug 487832 - Thunderbird startup performance issues [meta]
- Template:Bug 357008 - (If you have a profile created between version 1.5 and 2.0) Remove obsolete directory address books entries from prefs
- ref: Thunderbird Performance knowledge base article
- ref: Standard diagnostic for Thunderbird knowledge base article
- ref: bug 480841 Implement memory reporter for Gloda
- ref: bug 480843 Implement memory reporter for mailnews
- Lightning related:
- bug 441710 - Thunderbird freezes/slow for 3-60 seconds caused by calendar/lightning [meta]
- bug 753343 - Soft-hang and massive memory leaks with Lightning and ics enabled
- bug 501689 - Investigate making storage asynchronous // bug 462277 - (calcache) [meta][GSoC 2014] Turn on offline cache by default for new calendars
- bug 498968 - Create a new, faster storage "storage2" provider
- larger, less selective list of bugs inclusive of those cited above
Bugs fixed but not released. Typically fixed in unreleased versions (eg. trunk regressions):
- bug 1502923 - Thunderbird processing / "Not Responding" 5 to 30 minutes at startup. Also "Unresponsive Script" - Performance issues in unifinder.js
Fixed bugs/issues:
Performance bugs fixed in 60.0:
- bug 1293245 message with malformed email address makes Thunderbird hang 100% CPU load (also some crashes)
- bug 1428082 - Thunderbird Daily becomes unresponsive when Add-ons Manager opened from hamburger after bug 1427407 landed (TB59,fixed TB60)
- bug 1415723 - Severe regression in at least Tb55 when repairing/rebuilding/compacting folder database (msf) file. (TB55, fixed TB59)
- bug 1404003 Daily from 2017-09-28 re-downloads and indexes messages at every start - high CPU (TB58, fixed TB58)
- bug 1116196 - Every startup, Warning: Unresponsive Script after approx 15 seconds, with system integration prompt (regression in TB18, stopped appearing in TB54beta)
Performance bugs fixed in 52.0.x:
- bug 1290733 - UpdateSendLock() in compose window is very slow (TB23, fixed TB51)
- bug 562965 - folderPane.js ftv_getRowProperties/ftv_getCellProperties disproportionately slow
- bug 1290729 - Adding new recipients in compose is very slow
- bug 1242050 - Default output *stream* buffer size of 16KB instead of 4KB
- bug 558528 - Larger *disk* buffer size, 16KB instead of 4KB, in file I/O by Mail&News to improve performance on slower drives (for example network drives/shares).
Performance bugs fixed in 45.0.x:
- bug 1223371 - remove windows search, aka integrated search, from Thunderbird System integration dialog startup prompt (not an actual perf improvement, just avoids tempting uneducated users from picking it)
Resolved at unknown date
- bug 1185245 - Hardware acceleration (HWA) may cause message compose window to lag severely (WFM)
Performance bugs fixed in 38.0:
- bug 872869 - nsMsgDatabase::ListAllKeys() very slow with high CPU downloading messages into large folder (xref: bug 764306) (regression in TB16)
- bug 846123 - Thunderbird 100% CPU for minutes when copying a large number of messages (IMAP Online Copy, Copy between Offline-Use=Off folders) (landed in TB37)
- bug 939462 - Feature to count and show number of unread e-mails in subfolders should be optional. (because enumeration is slow) (regression in TB15) Fixed by bug 1135310 Algorithm from bug 723248 for closing idle folder databases is broken because too many/all databases can be closed and bug 464973 "Expanded Columns" in the folder pane are no longer available to select columns for display for message total count and folder size
- bug 870556 - O(n^2) performance freezes UI for several minutes fetching new mail from IMAP server for very large folder
- bug 778907 - Highlighting/selecting 18000+ of emails inside a folder keeps giving the javascript is unresponsive script ("bulkoperations", i.e. not a general performance issue) (landed in TB36)
- bug 1050840 - "Maximum number of imap server connections to cache" advanced account setting defaults to 1 for new accounts (regression in TB24)
Performance bugs fixed in 31.0:
- bug 975795 - extremely slow for large selections, because folderDisplay.canArchiveSelectedMessages is too slow (landed in TB30) (helped by bug 943116 and bug 942638)
- bug 1019969 - (resolved WFM, cause and fix unknown) Thunderbird 18-30b1 gets "Unresponsive script" 45 seconds after launch/startup. OK in 31.0
- bug 926181 - Thunderbird 24 OSX freezes on startup with profile on network drive (AFP) - fixed via bug 918612 - Mac: Firefox 24 doesn't start, or very slow startup
Performance bugs fixed in 24.0:
- bug 812923 - Dragging a huge number of messages onto a folder freezes TB even BEFORE dropping (TB24)
- bug 750781 - Thunderbird 12 veryyyyy slow when opening Message. Sometimes shows "Not Responding" (TB21)
- bug 810637 - HUGE memory consumption when downloading headers for large IMAP folder with mailnews.customDBHeaders (TB19)
Performance bugs fixed in 17.0:
- bug 806760 - TB16 Redownloads messages / Constantly bringing folders "up to date" / horrible IMAP performance (TB16 regression)
- bug 769346 - Poor performance of Move, Copy and Delete to Local Folders due to "one write request per a line of message data"
Performance bugs fixed in 16.0.2:
- bug 803843 - IMAP mailfiles keep growing to gigabyte size
Performance bugs fixed in 16:
- bug 793455 - DB cache is closing databases too frequently (regression in 15.0)
- bug 770416 - (insignificant?) memory leak on some IMAP operations
Performance bugs fixed in 15.0.1:
- bug 782899 - Daily hangs and leaks memory like crazy when trying to delete messages in the results of a filter search (regression in 15.0)
Performance bugs fixed in 15.0:
- bug 784286 - Abnormal memory requirements viewing plain-text mail leading to crash
- bug 723248 - add support for closing inactive databases (folders)
- bug 762169 - Always asking to compact folders starting version 12
Performance bugs fixed in 14.0:
- bug 538378 - Mass delete of messages resulted in massive memory usage // bug 296453 - Racing CPU, slow performance moving/deleting/dragging large number of messages
Performance bugs fixed in 13.0:
- bug 551144 - checking rss feeds has problem freezing Thunderbird UI and high hard drive usage (not a v3 or v3.1 regression)
Performance bugs fixed in 10.0:
- improved gloda (globa indexing) efficiency via: bug 677805, bug 554015, bug 554033, bug 678405
Performance bugs fixed in 9.0:
- bug 689742 - Disable hardware acceleration (direct2d) in Thunderbird
Performance bugs fixed in 5.0
- bug 574952 - Thunderbird 3.1 account list / folder pane slow to scroll on Mac (Mac-only)
- bug 617839 - Switching to threads with a large number of emails is extremely slow
Performance bugs fixed in 3.1.5:
- bug 542234 memory increases about 12MB on each check for new mail for pop accounts, 3.0 & 3.1
- bug 599119 slow message display/slow navigation - plugin directory scans cause excessive overhead
Performance bugs fixed in 3.0.9:
- bug 542234 memory increases about 12MB on each check for new mail for pop accounts, 3.0 & 3.1
Performance bugs fixed in 3.0.5:
- bug 530098 gloda message deletion processing is expensive
Performance bugs fixed in 3.1:
- bug 533776 gloda indexes while offline, if we startup without a network connection
- bug 539389 Very slow file manipulation deleting or moving messages (profile stored on synchronized network folder). Tb3 requests write for each line of mail data. Should use buffering.
- bug 545126HTML Mail View very slow (45++ sec) for pop and local folders (*not* fixed in v3.0.x) / bug 536873 slow load HTML messages with View Message Body as Original HTML - sits at "Loading Message ..." or presents blank screen
- bug 530098 gloda message deletion processing is expensive (*not* fixed in v3.0.x)
- bug 493848 gloda activity manager should not create events for event-driven indexing, never display in status bar (*not* fixed in v3.0.x)
- bug 543737 gloda needs to avoid indexing ridiculously large message bodies (especially from offline store corruption) (indexing stops at 20k per message part)(*not* fixed in v3.0.x)
- bug 560695 clicking (more) widget in headers with lots of recipients too slow (*not* fixed in v3.0.x)
Performance bugs fixed in 3.0.4:
- bug 533776 gloda indexes while offline, if we startup without a network connection
- bug 539389 Very slow file manipulation deleting or moving messages (profile stored on synchronized network folder). Tb3 requests write for each line of mail data. Should use buffering.
Memory related bugs fixed in 3.0.2/3.0.3:
- bug 540214 imap STATUS not closing db - mail.check_all_imap_folders_for_new and "check this folder for new messages" causes high memory and error message Unable to open the summary file for xxxxx. Perhaps there was an error on disk, or the full path is too long.
Performance related bugs fixed in 3.0.1:
- bug 534835 offline folder size constantly increases using Exchange IMAP (Exchange returns wrong rfc822 size) - messages redownload
- bug 537820 quick search in smart folders/saved searches should prefer offline when it has a choice
- bug 533865 Doing a quick search in a cross-folder saved search clears cached results
Memory related bugs fixed in 3.0
- bug 525646 Mass delete of messages resulted in massive memory usage (not sustained usage, and was v3-only behavior I think, i.e. not from v2)
Fixed in version 2 and / or prior to releasing version 3.0:
- RSS
- google desktop search
- bug 465353 general sluggish, lack of responsiveness during indexing of gloda (indexing speed kills CPU and performance)
- bug 518918 Thunderbird 3pre high memory and consuming 100% CPU making mail nearly unusable, need to handle UID's > 0x7FFFFFFF (fixed in 3.0.0)
- bug 465122 Gloda: Does not close msf files on initial indexing
- bug 387403 Thunderbird eat memory until crash when opening e-mail with broken vcard (fixed in version 2.0.0.13)
- bug 216535 large mailboxes seem to cause pathological memory usage, was duped to ...
- bug 266679 Thunderbird consumes excessive file-handles and memory (fixed 1.5.<something>, and before release of 2.0)
Memory Overview
If you don't need background information about memory, please skip to diagnosis steps.
"How much memory is needed run Thunderbird?" is a frequently asked question. System Requirements defines minimum Thunderbird machine requirements for a "mythical" user. But, these are just minimums, and do not describe how much memory you might need in your "real" environment. A better answer of what is enough memory might be ...:
- a) It depends on your Thunderbird configuration (number of large folders, number of accounts, etc)
- b) It depends on what you are measuring or doing in Thunderbird at a specific time, because some operations require more memory than others. Like when you are doing mundane things like reading new messages versus when you are searching for messages.
- c) Current versions require roughly at least 80 MB to 100 MB more memory than version 2. So (for example) if your version 2 used 50MB, then v3 might use 130 MB to 150 MB.
Which memory to measure ...
- MS Windows - Working Set/Mem Usage of thunderbird.exe (start taskmgr from ctrl+alt+delete, click Processes tab), and both Total and Available physical memory from the Performance tab.
- Mac - Real Private Memory of thunderbird (process manager, right click on column bar, select Real)
- linux - RSS/RES (Reserved Segment Size) for thunderbird
Rules of thumb (these are not "laws") for an average user with NO addons ... after a day of using Thunderbird, if memory usage is :
- less than 250MB, then you are OK.
- not much above your version 2 memory usage plus 100MB, then you are probably OK.
- is over 300MB, then you may have a problem that needs analysis.
- increasing significantly over a period of day or more, and never drops back below 300MB, i.e. it increases cumulatively over time then you may have a problem. For example, if you click on a folder and memory increases by 10MB and stays at that level or higher forever, and next time you click the same folder and memory increases another 10MB and stays at that level or higher forever ..., then you have a problem.
Note: memory usage is affected by the number and types of extensions (add-ons) installed, number of folders and accounts, number of messages in folders, and bugs.
Other Software
Add-ons / Extensions reported to have caused high memory, performance, or other problems:
- darkreader
- Adblock Plus
- Cloudmark DesktopOne, Cloudmark DesktopOne again
- Google Contacts
- Everygain Translator
- mailtweak (slowness)
- enigmail: bug 519226 extremely high memory requirements on Linux with Enigmail, high cpu with enigmail
-
junquilla (slowness) bug 505577 Scrolling in folder pane is choppy, slow, with high memory (fixed in current release) - Quicktext (slowness)
- ThunderBrowse (slowness)
- google desktop search
Programs (firewall, antivirus, etc) reported to have caused high memory, performance or other problems:
- ogplanet Game Launcher/npOGPPlugin.dll bug 543082 slow opening an email on windows
- Secunia PSI
- THE SHIELD bug 542156
- Eset NOD32 bug 541197 Repeated attempts to create huge temporary file during message synchronization due to Eset NOD32 causes slow gloda indexing
- F-Prot Antivirus may cause very slow access to mailbox files. See: Antivirus Related Performance Issues
Miscellaneous
Terminology
- memory usage - varies per OS: in Windows XP taskmgr the column is 'Mem Usage', in Vista it is 'Working Set'
- Glossary