Tomcat download speed

Support for webhosts that use CentOS
mabg
Posts: 5
Joined: 2011/10/28 00:13:28
Contact:

Tomcat download speed

Post by mabg » 2011/10/28 00:22:36

Hello,

When I download an exe large file from a Tomcat server, the download speed is very low (50Kb). From my computer I can download on other servers at 500Kb.

Is there any configuration on CentOS that limits the download speed for each connection? How can increase the download speed?

And for the upload speed?

Thank you very much.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Tomcat download speed

Post by pschaff » 2011/10/28 10:44:57

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

It is certainly possible to limit connection speed, but AFAIK you would have to have configured that. Hard to guess where the bottleneck is without more information.

Can you test the speed to the server with other access methods?

mabg
Posts: 5
Joined: 2011/10/28 00:13:28
Contact:

Re: Tomcat download speed

Post by mabg » 2011/11/02 16:07:13

I've downloaded and uploaded files with FileZilla with a SSH connection, and the speed is very low.

Thank you very much.

mabg
Posts: 5
Joined: 2011/10/28 00:13:28
Contact:

Re: Tomcat download speed

Post by mabg » 2011/11/02 16:16:24

I'm thinking that is something limiting the connection speed because if I download the same file with two independent connections, each has the some speed (50Kb), so it seems that there are some limit for each connection.

Thank you for the links. If you need some information, please tell me what type (basic, disk, ...) that appears on "How to Provide Information About Your System".

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Tomcat download speed

Post by pschaff » 2011/11/02 20:41:46

As there is so much uncertainty then just running the script without parameters would be most appropriate. That will tell us about your kernel version, repo config, hardware, and network configuration, along with some additional less relevant stuff like disk info. It would also be good to tell us more about the network topology and whether your tests are on the LAN or from the Internet, or both.

mabg
Posts: 5
Joined: 2011/10/28 00:13:28
Contact:

Re: Tomcat download speed

Post by mabg » 2011/11/02 23:07:03

The machine is a VPS. I contact with my server provider and it says that no have any restrictions on speed limit. My test are from Internet.

When I run the script, it hangs (more than 10 minutes executing and only appears "Collecting CentOS system information for all questions." and doesn't finish).

It creates the file basedata.O21609 on /tmp. It contains:

Information for general problems.
[code]
== BEGIN uname -rmi ==
2.6.18-028stab068.9 i686 i386
== END uname -rmi ==

== BEGIN rpm -qa \*-release\* ==
atomic-release-1.0-11.el5.art
centos-release-notes-5.5-0
centos-release-5-5.el5.centos
== END rpm -qa \*-release\* ==

== BEGIN cat
/etc/redhat-release ==

r_hartman
Posts: 706
Joined: 2009/03/23 15:08:11
Location: Netherlands
Contact:

Re: Tomcat download speed

Post by r_hartman » 2011/11/03 08:30:40

[quote]== BEGIN uname -rmi ==
2.6.18-028stab068.9 i686 i386
== END uname -rmi ==[/quote]
You are not running [url=http://wiki.centos.org/AdditionalResources/OtherSpins]real CentOS[/url].
Regardless, the getinfo.sh script should complete normally, provided you copy/pasted or downloaded it correctly.

Is the line break (last line) in the file, or is it a result of copying it onto the forum?
If it is in the file, the script may have been broken during installation. It should read
[code]== BEGIN cat /etc/redhat-release ==[/code]
Please correct and ensure the script runs.
Then post the output here.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Tomcat download speed

Post by pschaff » 2011/11/03 11:16:35

If still hanging, then try[code]
./getinfo.sh basic
./getinfo.sh driver
./getinfo.sh package
./getinfo.sh network
./getinfo.sh disk
[/code]
What runs and what hangs should at least give a clue what is causing it to hang, as well as providing more output data.

See also
[url=http://wiki.centos.org/AdditionalResources/OtherVoices]Other Voices[/url]
[url=http://wiki.centos.org/AdditionalResources/OtherSpins]When CentOS Is Not CentOS[/url]
[url=http://wiki.centos.org/TipsAndTricks/BrokenVserver]Broken Virtual Server[/url]

Anything familiar there?

mabg
Posts: 5
Joined: 2011/10/28 00:13:28
Contact:

Re: Tomcat download speed

Post by mabg » 2011/11/04 00:33:44

Thank you very much, it seems that doesn't copied correctly for some reason. I've copied another time the script and now it works. The result:

Information for general problems.
[code]
== BEGIN uname -rmi ==
2.6.18-028stab068.9 i686 i386
== END uname -rmi ==

== BEGIN rpm -qa \*-release\* ==
atomic-release-1.0-11.el5.art
centos-release-notes-5.5-0
centos-release-5-5.el5.centos
== END rpm -qa \*-release\* ==

== BEGIN cat /etc/redhat-release ==
CentOS release 5.5 (Final)
== END cat /etc/redhat-release ==

== BEGIN getenforce ==
Disabled
== END getenforce ==

== BEGIN free -m ==
total used free shared buffers cached
Mem: 512 209 302 0 0 0
-/+ buffers/cache: 209 302
Swap: 0 0 0
== END free -m ==

== BEGIN rpm -q yum rpm python ==
yum-3.2.22-26.el5.centos
rpm-4.4.2.3-18.el5
python-2.4.3-27.el5
== END rpm -q yum rpm python ==

== BEGIN ls /etc/yum.repos.d ==
atomic.repo
CentOS-Base.repo
CentOS-Media.repo
jpackage50.repo
== END ls /etc/yum.repos.d ==

== BEGIN cat /etc/yum.conf ==
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
== END cat /etc/yum.conf ==

== BEGIN yum repolist all ==
Loaded plugins: fastestmirror
Determining fastest mirrors
* atomic: www7.atomicorp.com
* base: centos.mirror.xtratelecom.es
* extras: centos.mirror.xtratelecom.es
* jpackage-generic: sunsite.rediris.es
* jpackage-generic-updates: sunsite.rediris.es
* updates: centos.mirror.xtratelecom.es
repo id repo name status
addons CentOS-5 - Addons enabled: 0
atomic CentOS / Red Hat Enterprise Linu enabled: 832
atomic-testing CentOS / Red Hat Enterprise Linu disabled
base CentOS-5 - Base enabled: 2,705
c5-media CentOS-5 - Media disabled
centosplus CentOS-5 - Plus disabled
contrib CentOS-5 - Contrib disabled
extras CentOS-5 - Extras enabled: 253
jpackage-fc JPackage (free) for Fedora Core disabled
jpackage-fc-updates JPackage (free) for Fedora Core disabled
jpackage-generic JPackage (free), generic enabled: 3,307
jpackage-generic-nonfree JPackage (non-free), generic disabled
jpackage-generic-nonfree-updates JPackage (non-free), generic disabled
jpackage-generic-updates JPackage (free), generic enabled: 29
jpackage-rhel JPackage (free) for Red Hat Ente disabled
jpackage-rhel-updates JPackage (free) for Red Hat Ente disabled
updates CentOS-5 - Updates enabled: 273
repolist: 7,399
== END yum repolist all ==

== BEGIN egrep 'include|exclude' /etc/yum.repos.d/*.repo ==
== END egrep 'include|exclude' /etc/yum.repos.d/*.repo ==

== BEGIN sed -n -e "/^\[/h; /priority *=/{ G; s/\n/ /; s/ity=/ity = /; p }" /etc/yum.repos.d/*.repo | sort -k3n ==
priority = 1 [atomic]
#priority = 1 [atomic-testing]
priority = 1 [atomic-testing]
== END sed -n -e "/^\[/h; /priority *=/{ G; s/\n/ /; s/ity=/ity = /; p }" /etc/yum.repos.d/*.repo | sort -k3n ==

== BEGIN cat /etc/fstab ==
none /dev/pts devpts rw 0 0
== END cat /etc/fstab ==

== BEGIN df -h ==
Filesystem Size Used Avail Use% Mounted on
/dev/vzfs 5.0G 3.3G 1.8G 66% /
none 256M 4.0K 256M 1% /dev
== END df -h ==

== BEGIN fdisk -l ==
cannot open /proc/partitions
== END fdisk -l ==

== BEGIN blkid ==
== END blkid ==

== BEGIN cat /proc/mdstat ==
cat: /proc/mdstat: No such file or directory
== END cat /proc/mdstat ==

== BEGIN pvs ==
== END pvs ==

== BEGIN vgs ==
== END vgs ==

== BEGIN lvs ==
== END lvs ==

== BEGIN rpm -qa kernel\* | sort ==
kernel-headers-2.6.18-194.3.1.el5
== END rpm -qa kernel\* | sort ==

== BEGIN lspci ==
./getinfo.sh: line 87: lspci: command not found
== END lspci ==

== BEGIN lspci -n ==
./getinfo.sh: line 87: lspci: command not found
== END lspci -n ==

== BEGIN lsusb ==
./getinfo.sh: line 87: lsusb: command not found
== END lsusb ==

== BEGIN ifconfig -a ==
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:9462921 errors:0 dropped:0 overruns:0 frame:0
TX packets:9462921 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4272800868 (3.9 GiB) TX bytes:4272800868 (3.9 GiB)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:18741120 errors:0 dropped:0 overruns:0 frame:0
TX packets:32984569 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1807073000 (1.6 GiB) TX bytes:44781398817 (41.7 GiB)

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:188.xx.xx.xx P-t-P:188.xx.xx.xx Bcast:188.xx.xx.xx Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

== END ifconfig -a ==

== BEGIN route -n ==
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
191.xx.xx.0 0.0.0.0 255.255.255.0 U 0 0 0 venet0
169.xx.xx.0 0.0.0.0 255.255.0.0 U 0 0 0 venet0
0.0.0.0 191.xx.xx.1 0.0.0.0 UG 0 0 0 venet0
== END route -n ==

== BEGIN cat /etc/resolv.conf ==
nameserver 188.xx.xx.xx
== END cat /etc/resolv.conf ==

== BEGIN grep net /etc/nsswitch.conf ==
#networks: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files
netmasks: files
networks: files
netgroup: nisplus
== END grep net /etc/nsswitch.conf ==

== BEGIN chkconfig --list | grep -Ei 'network|wpa' ==
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
== END chkconfig --list | grep -Ei 'network|wpa' ==

[/code]

r_hartman
Posts: 706
Joined: 2009/03/23 15:08:11
Location: Netherlands
Contact:

Re: Tomcat download speed

Post by r_hartman » 2011/11/04 07:31:46

mabg wrote:
[code]== BEGIN ifconfig -a ==

<snip 'lo' info>

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:18741120 errors:0 dropped:0 overruns:0 frame:0
TX packets:32984569 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1807073000 (1.6 GiB) TX bytes:44781398817 (41.7 GiB)

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:188.xx.xx.xx P-t-P:188.xx.xx.xx Bcast:188.xx.xx.xx Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

== END ifconfig -a ==

== BEGIN route -n ==
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
191.xx.xx.0 0.0.0.0 255.255.255.0 U 0 0 0 venet0
169.xx.xx.0 0.0.0.0 255.255.0.0 U 0 0 0 venet0
0.0.0.0 191.xx.xx.1 0.0.0.0 UG 0 0 0 venet0
== END route -n ==

== BEGIN cat /etc/resolv.conf ==
nameserver 188.xx.xx.xx
== END cat /etc/resolv.conf ==[/code]
While I'm not a full blown network specialist I like to think I know a fair bit about networking, and to me this is puzzling.
From the routing table I would conclude that venet0 is in the 191.xx.xx.0 network, yet ifconfig shows no 191.xx.xx.0 address for venet0, but some local 127.0.0.1 address for a P-t-P connection.
The nameserver is in the 188.xx.xx.xx network, where virtual interface venet0:0 also resides. But that network is missing altogether from the routing table.
I would have expected a line similar to
[code]188.xx.xx.0 0.0.0.0 255.255.255.0 U 0 0 0 venet0:0[/code]
in that routing table, as name resolution now apparently has to be done through the 191.xx.xx.0 network instead of over the 188.xx.xx.xx one.
This might be responsible for slow DNS resolution and, hence, the slow network responses.
However, I would not really associate slow DNS with slow downloads, as once the connection is established DNS should not really matter to the link speed.

Otoh, my network knowledge may be lacking. I sure don't grasp the venet0 info, but that could be because of the point-to-point setup, which I associate with dial-up links.
Then again, venet0:0 is P-t-P also, and does have the expected address, so I really think that venet0 should have a 191.xx.xx.xx address, not 127.0.0.1.

You may want to talk to your provider again about this.

Post Reply

Return to “CentOS 5 - Webhosting Support”