LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-08-2022, 06:31 PM   #1
geo77
LQ Newbie
 
Registered: Jan 2021
Posts: 4

Rep: Reputation: Disabled
dovecot / imap taking up cpu


Hi,
I have a postfix, dovecot email server on linux.
I was having an issue with one of my users not being able to download his emails, so I went into /etc/dovecot.conf and increased the memory allowed to be used to 1024MB
adding the following

service imap{
vsz_limit =1024MB
}

The user was able to download his email, but now my cpu usage is going off the charts. All I am able to determine is that I have a bunch of imap processes that I assume are taking up my cpu.
I have no error messages in the logs, everything looks normal, but I may not be looking in the correct place.

I need help pin pointing what specifically dovecot/imap is doing to take up my entire cpu resources.

Thanks for any help!

Last edited by geo77; 02-08-2022 at 07:34 PM.
 
Old 02-08-2022, 08:33 PM   #2
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,812

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by geo77 View Post
Hi,
I have a postfix, dovecot email server on linux.
I was having an issue with one of my users not being able to download his emails, so I went into /etc/dovecot.conf and increased the memory allowed to be used to 1024MB
adding the following

service imap{
vsz_limit =1024MB
}

The user was able to download his email, but now my cpu usage is going off the charts. All I am able to determine is that I have a bunch of imap processes that I assume are taking up my cpu.
I have no error messages in the logs, everything looks normal, and no other indication of what could be going on.

I need help pin pointing what specifiacally dovecot/imap is doing to take up my entire cpu.

Thanks for any help!
My suspicion is that the system is memory-starved.

I'm running Postfix+Courier so this might be an apples-to-oranges comparison but I've not allocated more system resources than the default and haven't seen any performance problems. (I might, though, if I hadn't setup some mail filtering within postfix that simply drops a lot of trash on the floor.)

Questions for you:
  • If there's a drive activity LED, is it blinking wildly?
  • What was the previous vsz_imit? (Happily, it doesn't look like you've done what I've seen others do which is to simply tack a "0" on the end of the parameter value -- "Hey! Who set the fraznit size to '10240'?" Fixed one problem and generated several more. :^D )
  • How much physical RAM is installed?
  • How much swap space has been allocated?
 
Old 02-08-2022, 11:33 PM   #3
geo77
LQ Newbie
 
Registered: Jan 2021
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rnturn View Post
My suspicion is that the system is memory-starved.

I'm running Postfix+Courier so this might be an apples-to-oranges comparison but I've not allocated more system resources than the default and haven't seen any performance problems. (I might, though, if I hadn't setup some mail filtering within postfix that simply drops a lot of trash on the floor.)

Questions for you:
  • If there's a drive activity LED, is it blinking wildly?
  • What was the previous vsz_imit? (Happily, it doesn't look like you've done what I've seen others do which is to simply tack a "0" on the end of the parameter value -- "Hey! Who set the fraznit size to '10240'?" Fixed one problem and generated several more. :^D )
  • How much physical RAM is installed?
  • How much swap space has been allocated?
My ram is not a problem, I have about 10GB and only about 6GB are being used. I did however noticed my swap is being take up 90%, I added some more, but didn't really saw much difference.

I did ran across this post in the dovecot documentation, and it mentions to set the mail_cache_max_size variable as a possible solution, but I don't know where to set it. I tried setting it in the dovecot.conf, but it doesn't work, the service won't start. Any idea where this variable should go?

https://doc.dovecot.org/admin_manual...s/large_cache/
 
Old 02-09-2022, 12:55 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,147

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Quote:
Originally Posted by geo77 View Post
I did however noticed my swap is being take up 90%, I added some more, but didn't really saw much difference.
How did you add swap - in detail. What does this produce - is your extra swap extent included ?.
Code:
swapon -s
Can't help with dovecot.
 
Old 02-09-2022, 12:37 PM   #5
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,812

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by geo77 View Post
I tried setting it in the dovecot.conf, but it doesn't work, ...
I've only tried Dovecot and that was several years ago. I'm sorry but I'm not up to speed on how to tune that particular bit of code.

Quote:
... the service won't start.
Well, that's just rude. No error message in a log file or anything?

Not starting at all is pretty different from just running slowly. Not knowing anything about what else is running on your system makes it tough to determine just what is going on. Another I/O intensive task competing for access to the Dovecot mail store?

I wonder about your having 4GB of free RAM but swap usage at 90%. I usually only see significant swap use when my RAM gets up to ~90+% with 8GB on the Courier box. On that box, it's ~68% RAM, 0% swap. On my desktop with a tons of tabs open in browsers, it's only 50%, 0% swap. How much swap space have you allocated? Where is it located? Same disk as Dovecot's mail files? (Could be an I/O contention problem as I mentioned above.) I usually create swap partitions in the middle of several disks (to minimize head seek times) and assign them all the same priority to use round-robin swap access. Doesn't totally eliminate the effect of swapping, but every little bit helps.

Posting more configuration information will likely results in more responses. Keep it coming.
 
  


Reply

Tags
cpu, dovecot, imap



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Dovecot authorization fails when trying to connect via Mutt but all suggested Dovecot auth tests work spenced Linux - Server 1 04-18-2020 11:04 PM
dovecot-auth: pam_succeed_if(dovecot:auth): error retrieving information about user karsel Linux - Newbie 0 12-11-2012 07:44 AM
Dovecot 1.x to Dovecot 2.x mbox to Maildir best transfer program silent_wumpus Linux - Server 0 09-05-2012 02:59 PM
/usr/local/libexec/dovecot/dovecot-lda - IS MISSING ?!? snowweb Linux - Server 1 08-14-2012 07:05 AM
Difference between Dovecot IMAP and Cyrus IMAP sever ? rajdeepbhattacharya Linux - Newbie 3 06-18-2008 03:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration