Hello I just started a new virtual machine as a server; problem is when I tried to upload some files via the File Manager in Webmin it took like forever so I tested the upload to the server via ftp - the speed is awfull, slower than 190Kb/s. The download speed is instead better arround 1Mb (anyway slower than before had another VM on the same physical server). Where should I check/look?
At first the VM was created with the Network device model Intel Gigabit Ethernet (thought maybe I’ll get some speed as my network is Gb Ethernet, and wanted to add another network card int he future for my LAN, is my assumption wrong?). Maybe it helps. Then I also tried with the default setting and a restart - nothing.
The webmin reads about the card:
Network link status Connected Interface speed 100Mb/s , Full duplex
HOST: Operating system CentOS Linux 6.3 Webmin version 1.590 Virtualmin version 3.93.gpl GPL Cloudmin version 6.4.kvm Theme version 8.5 Kernel and CPU Linux 2.6.32-279.2.1.el6.x86_64 on x86_64
VM: Operating system CentOS Linux 6.3 Webmin version 1.590 Virtualmin version 3.93 Pro
Theme version 8.5 Kernel and CPU Linux 2.6.32-279.5.1.el6.x86_64 on x86_64
Do you have VirtIO enabled for network interfaces on the VM? You can see this at System Configuration -> Network Interfaces -> eth0, by looking at the “Network device model” field. I’ve found that virtIO provides better performance that the alternatives, which work by emulating real network cards.
On my test system with a CentOS 6 VM with VirtIO, I can saturate a 100 Mbps network interface when copying via SSH.
I modified to VirtIO, no change to the upload speed on FTP, SSH (SFTP), in your webmin file manager, upload and download files module; it is awfull, under 190Kb! And the VNC works like hell… Problem is if i run some random speed test in the browser (firefox) it’s everything fine > 10Mb. What would be the proper course of action?
Also tested FTP on 990 with explicit FTP over TLS - the same…
And i discovered a problem looging in with a a regular user, created at the installation time, I can download and see everything getting out of my jail (so there isn’t one) via SFTP with winscp OMG!
Later edit: tried to upload an 100MB file somewhere in public_html - took ages… but then when i downloaded it in the browser, around 700Kb…
Later later edit: maaan this is not ok - huge bug somewhere, logged in sftp with winscp using a user created via virtualmin (the virtual server user wich has by default, as it should have, accees to ftp and ssh). I could than get out of my home, enter another directory of another user (owner of another domain) and download the configuration.php file for example wich contains no more than the password of the second user (required by the CMS to access the database)! Pls solve this fast as it’s a huge security breach.
Didn’t mess at all with the ssh config files, nothing, just opened 22 port in firewall…
Let’s look at the network speed issue first. FTP and SSH should be faster than the Webmin file manager, as the latter is written in Perl.
What kind of speed do you get if you run a command like :
scp /tmp/somelargefile root@yourvm:/dev/null
By copying to /dev/null, you take disk speed on the VM out of the equation. Scp should report the average speed of the copy once it completes…
OK, tried it: 1,2 Mb/s, lame but seems better, on a 100MB file.
You should also try a copy across the network to the system that is hosting the VM, assuming that you have another machine on the same LAN. That will determine if the slowness is coming from the network, the host machine, or KVM.
So, uploads all SSH except where mentioned:
from my desktop to the physical host on internal LAN 1GB connection = 190KB (FTP and sftp with WinSCP, as I’m using Windows) 3MB/s (not good!)
from my desktop, external connection to the VM = 190KB (FTP and sftp with WinSCP, as I’m using Windows)
from other physical server, other ISP, external connection to the VM =2MB
from the physical host to the VM = 33,3MB/s (I guess it’s higher, it takes less than 1sec, so it is not an issue between them)
from the physical host to the other physical server external connection = 628.2KB/s
from the physical host to the other physical server internal 1GB/s LAN connection = 33.3MB/s (no problem here also)
The FTP is the worst - to the host and guest I got from my desktop (external connection) the same lame speeds < 200KB/s
PS I added a second card to the VM, tied to another bridge for my LAN, problem is Cloudmin keeps telling me to connect on the external IP of the host (awfull speed) and changed it from the LAN one. How can I modify this? And why not connect on any of them, why are exclusive?
What about the speed from another physical system on the same LAN to the VM? Comparing that with the 33 MB/s from test 5 would be useful …
Can’t try directly, as I’m using Windows, so with WinSCP wich uses ssh’s scp command I get around 2-3.3MB/s in the internal gigabit LAN… Instead on ftp I get >30MB/s
Later Edit: here it is:
6. from other physical server to the VM internal 1GB/s LAN connection = 25MB/s
So if the speed from other machine -> VM is 25 Mbits/second and the speed from other machine -> host is 30 Mbits/second, it doesn’t look like the VM network is a big problem. Some overhead is expected due to the virtualization layer, but you are only losing 20% of your speed.
Or is the real issue that SCP is much slower than FTP?
Problem is I cannot upload anything - nor will my users when I’ll move the domains onto it, except from my local network. And it is a problem with scp indeed. Can pls offer some guidinig lines to those other 2 problems or should I open another threads?
I added a second card to the VM, tied to another bridge for my LAN, problem is Cloudmin keeps telling me to connect on the external IP of the host (awfull speed) and changed it from the LAN one to the public IP. How can I modify this? And why not connect on any of them, why are exclusive?
I discovered a problem looging in with a a regular user, created at the installation time, I can download, modify and see everything, getting out of my jail (so there isn’t one) via SFTP with winscp. The SSH server isn’t configured at all to use the chroot directives wich is capable of. Can you give us a recommended setup pls? This is surely not good when you have multiple admins, each one knows that their directory is calle as their user, and that they can fin the MySQL and Webmin login passwords in the conf files…
What do you mean by cloudmin is telling you to connect to the external IP? Does connecting to the internal IP not work at all?
I’d recommend starting a separate thread about point 2, as it seems like a completely different issue.
It didn’t work at all but after a restart of the physical host everything went fine. But I have now 2 VMs and tried to add a second card to this new one I just created (and properly configured as DNS and backup mail server).
Something did go wrong again: added a second interface in Cloudmin>System Configuration>Network Interfaces>Add a real interface with the internal 192.168.x.x IP linked to Network bridge on host br1 (the second one created for the internal network).
Now my eth0 is gone in this second virtual machine (the first one with the speed problems is fine), though I can see it and edit it in Cloudmin. Ifconfig shows only eth1 and lo. When I restart the network i get:
Bringing up interface eth0: device eth0 does not seem to be present, delaying initialization. [FAILED]
I don’t know what to do … with a virtual device that is there… but not there Thought to delete the old card in Cloudmin but how?
Any insight on this, how do i get rid of that eth0? It seems that other users have similar problems too http://www.virtualmin.com/node/23167 ?