CPU usage increased cause miniserv.pl file

10 posts / 0 new
Last post
#1 Wed, 01/06/2010 - 04:31
mtahir04july

CPU usage increased cause miniserv.pl file

Please anyone can help why my cpu usage increased i have postfix with virtualmin i have checked with top it shows me miniserv.pl cause 100% cpu usage please help to resolve this issue

Thanks

Tahir Atique

Wed, 01/06/2010 - 09:38
andreychek

Well, it's difficult to say what the issue is without some more details; some actions within Webmin/Virtualmin can be CPU intensive.

However, if the process is just sitting there taking up lots of CPU, and you're pretty sure someone isn't doing something important, you can always just restart it with --

/etc/init.d/webmin restart

and/or

/etc/init.d/usermin restart

Thu, 01/07/2010 - 02:48
mtahir04july

yes this happened when we trying to create batch users creating is any other way to avoid this this cpu max usage

Thanks

Tahir Atique

Thu, 01/07/2010 - 09:10
andreychek

Hmm... which Virtualmin option were you using to batch create users... the Add Servers -> Batch Create Servers option?

Roughly how many were being created, and how long did it take?

-Eric

Thu, 01/07/2010 - 12:14 (Reply to #4)
mtahir04july

we are trying to create batch email accounts suppose we would like to create 100,000 email accounts then

Thanks

Tahir Atique

Thu, 01/07/2010 - 12:21 (Reply to #5)
andreychek

Well, creating 100,000 email accounts is going to take a decent amount of CPU to complete :-)

The best I can offer is that if you're doing all this from the command line, you could run it with "nice -n 19" or similar to make it a bit more friendly.

Other than that, you may just want to run it in the evening or at night when it's less likely to affect the performance of your server.

-Eric

Fri, 01/08/2010 - 06:02 (Reply to #6)
mtahir04july

Hello,

Could you please explain this command how i have to run,

i hava 100 domains and each domains has more then 1000 accounts like

domain example.com have 1000 emails doamins example1.com have 1000 emails plz explain how i run your given command with respect to domains

Thanks

Tahir Atique

Fri, 01/08/2010 - 10:52 (Reply to #7)
andreychek

It all depends how you're doing it... if you're performing an import from within Virtualmin using the web browser, that wouldn't work.

But, if you're writing up a script, and utilizing Virtualmin's command line API (ie, running the "virtualmin" program from the command line), you can run the nice command as you call your script.

If you know anything about Bash scripting, that's probably your best option... and to have your Bash script call out to the "virtualmin" program.

So if you write a bash script to create all those accounts for you, and you call it something like "create_accounts.sh", you could use the "nice" program to make it a bit more gentle on the CPU with something like:

nice -n 19 create_accounts.sh

But again, if you have 100 domains that each need 1000 accounts, that's 100,000 accounts... that's a lot! It's going to take a lot of CPU no matter what you do :-)

-Eric

Mon, 01/11/2010 - 09:52 (Reply to #8)
mtahir04july

Can you please send me any script for it i am very new in bash scripting like we have domain abc.com and its users are 1@abc.com, 2@abc.com, 3@abc.com

how it will run where i have to run.

Thanks

Tahir Atique

Mon, 01/11/2010 - 09:57 (Reply to #9)
andreychek

Sorry, I don't have any such script. You would need to create it from scratch -- or hire someone to do that for you :-)

You could always try using the Batch Create users option within Virtualmin Pro, but as you said, for creating 100,000+ users, it's going to take a lot of CPU power to do all that.

-Eric

Topic locked