Submitted by sebastianmorsony on Mon, 12/07/2009 - 04:14 Pro Licensee
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
Submitted by andreychek on Mon, 12/07/2009 - 07:37 Comment #1
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!
Submitted by sebastianmorsony on Sun, 12/13/2009 - 03:20 Pro Licensee Comment #2
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 ~]#
Submitted by JamieCameron on Sun, 12/13/2009 - 13:04 Comment #3
Submitted by andreychek on Sun, 12/13/2009 - 14:44 Comment #4
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)?
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
Submitted by sebastianmorsony on Wed, 01/06/2010 - 09:37 Pro Licensee Comment #6
I've added more memory. Free now shows me the following.
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.
Submitted by JamieCameron on Wed, 01/06/2010 - 12:20 Comment #7
During the creation process, which step takes the longest?
Also, how many lines are in your /etc/passwd and /etc/group files?
Submitted by sebastianmorsony on Wed, 01/06/2010 - 17:10 Pro Licensee Comment #8
/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.
Submitted by JamieCameron on Wed, 01/06/2010 - 23:54 Comment #9
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.
Submitted by sebastianmorsony on Sat, 01/09/2010 - 14:33 Pro Licensee Comment #10
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)
Submitted by JamieCameron on Sat, 01/09/2010 - 16:14 Comment #11
Glad to - my IP is 98.210.100.7 . You can email me login details at jcameron@virtualmin.com
Submitted by sebastianmorsony on Tue, 01/19/2010 - 14:13 Pro Licensee Comment #12
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)
Submitted by JamieCameron on Tue, 01/19/2010 - 14:30 Comment #13
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.