Kádár Tamás (KTamas) put forth on 4/7/2011 9:33 AM:
Hi
Okay so we've been having this issue since forever and I figured why the heck not ask it here since it's mostly related to dovecot. The thing is, we have a huge amount of public folders (at the moment, around 1100). Now, with dovecot indexing and caching we're mostly okay, also being careful with things like Thunderbird 3's default 'Download everything' option ("Keep messages for this account on this computer") and such. However once in a while, someone goes rogue, we install a new version of thunderbird, someone accidentally sets up an email account in thunderbird mistakingly leaving the download everything option on. This causes high IO on our server, and a single user can quickly more or less kill the whole server in mere minutes, load average quickly spiking to 30-40-50 and everything becomes sloooooow (obviously).
Is there any way I can limit the amount of IO a certain user can use?
TTBOMK Dovecot has no data rate limiting controls, neither globally nor per user. As I see it you have a few of options:
- Switch to mdbox or mbox storage format to decrease IOs per email
- Beef up the server with many more RAID spindles
- Eliminate all unnecessary filesystem metadata and logging activity for instance, atime, if not done already
- Switch to a filesystem matched to your workload EXT3/4/Reiser are not optimal for high concurrency multi-user server workloads switch to XFS or JFS if currently using EXT3/4
- Install a traffic shaper in front of, or on, the Dovecot server Configure it to clamp any TCP sessions that exceed, say, 10 Mbit/s for more than 10 seconds down to 1 Mbit/s for a 1 minute duration. Tune to taste until you get the desired results.
Option 5 is the most sure fire way to solve the problem you describe. It is the most direct solution, and likely free (not including your time to set it up), assuming netfilter etc scripts are available to accomplish this.
-- Stan