Slow to create a new virtual server

Hi

My virtualmin server with 1489 virtual servers is really slow when creating a new virtual server. It takes a couple of minutes for the process to complete. Whan can I do to speed up things?

Best Regards Sebastian

Status: 
Closed (fixed)

Comments

Howdy -- here's a few questions that will help us diagnose what your seeing:

  • Is your system fairly speedy otherwise?

  • Are you using something like LDAP or MySQL for storing users, or the /etc/passwd file?

  • At what point did it become slow to add a Virtual Server? For example, it typically only takes a few seconds to add one... has it always been slow, did it just recently become slow, or has it slowly gotten worse?

  • What is the output of the commands "free" and "uptime"?

Thanks!

Hi

The system is fairly speedy normally. Login with ssh, ftp, file transfer etc..

I´m not using LDAP or MySQL. The users are stored in the passwd file as far as I know. It´s a default installation pretty much.

It´s gotten slower and slower. It used to be pretty fast. I know Igot a lot of sites on the server, but still it shouldn´t be that slow. I´m currently considering adding a new server and moving half of the sites to this new server in hope that it will solve my problems. Can that be automated? Move all sites from A - K to this server?

Just created a virtual server. It took 5 minutes and 15 sec. It took more than 3 minutes when doing the Adding administration user to groups ..

The output is from today. It will look differnt tomorrow since there´s not many users on the system currently.

[root@sekhmet ~]# free total used free shared buffers cached Mem: 3369424 3187292 182132 0 32148 192896 -/+ buffers/cache: 2962248 407176 Swap: 2031608 260904 1770704 [root@sekhmet ~]# uptime 10:05:56 up 5 days, 23:19, 1 user, load average: 1.24, 0.76, 0.42 [root@sekhmet ~]#

Howdy -- first off, if you decide to go that route, it wouldn't be hard to migrate a number of domains. What you'd do is just move the backups files of the ones you want to migrate to a directory of their own, then have Virtualmin on the other server import all the files from that particular directory.

That said, we can certainly look into some of the issues going on here.

First off, how many users are in your /etc/passwd file?

You can get a good view of that by typing:

wc -l /etc/passwd

And similar with the groups file:

wc -l /etc/group

Also, as Virtualmin is creating the Virtual Server, what sort of CPU load are you seeing (you can view that using the "uptime" command)?

ronald's picture
Submitted by ronald on Sun, 12/13/2009 - 15:05 Pro Licensee

If I may:
looks like it could do with a ram upgrade. It needs to use swap and it is slowing down the performance significantly

I've added more memory. Free now shows me the following.

         total       used       free     shared    buffers     cached

Mem: 12472796 3279504 9193292 0 508144 1814728 -/+ buffers/cache: 956632 11516164 Swap: 2031608 0 2031608

Virtualmin tells me this. Real memory 3.21 GB total, 2.58 GB used

Still slow as hell.

During the creation process, which step takes the longest?

Also, how many lines are in your /etc/passwd and /etc/group files?

/etc/passwd = 1589 lines /etc/groups = 1603 lines

The first part of the creation takes the longest I think. Looked at the servers processes during creation tody and perl was eating up a lot of cpu. 85 - 95% cpu the whole time.

If it is possible, I'd be happy to login to your system myself to see what Virtualmin is going at this step. It certainly shouldn't be taking that long .. this indicates some poor design in the code.

That would be great if you would take a look. If you can get me your external ip I can open up ssh and port 10000, so you can connect. Guess I shouldn't post username/password here. :o)

Jamie found an error in the code, that would make the process take longer than necessary. Jamie fixed the issue and the system is now quite a bit faster. :o)

Also, for anyone else who is seeing this, turning off the feature to add domain owners to the deniedssh group is a short-term work-around.