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

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

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

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

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

Thanks

Tahir Atique

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

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

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

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 :slight_smile:

-Eric

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

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

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