FrozenSand / UrbanTerror4

Official bug tracker for the game Urban Terror 4.x - www.urbanterror.info
77 stars 18 forks source link

Transfer speed limitation in clients #37

Closed ghost closed 10 years ago

ghost commented 10 years ago

Hey, maybe somebody else did notice this issue during use urban terror autodownload map on linux/bsd or windows systems?

On FreeBSD/Linux (any popular distribution) I get max speed ~1.25 MB/s (10 mbits, yes always) 50 MB map downloading equally 40 seconds.

It doesnt matter which protocol Im using (http, ftp) or which other mirror in sv_dlURL is always max 10 mbit/s. Tested on 64 and 32 bit systems and with self compiled UrT.

Wget, curl etc. working just fine from terminal with max transfers, but UrT using curl too, ye? So from where this limit come?

UPDATE: Ok, I just ran UrT on windows 8.1 32bit and is same limit 10 mbits/s, downloading for example ut4_mykonos_a14 which got 50~ MB took 40-42 seconds from LAN map mirror and same from internet.

I could cut my hand and say that on windows XP was fine, but now Im not rly sure. Maybe big transfer spikes which urt auto downloading screen showed just confused me but at the end it always shows 1.20-1.25 MB/s.

BidyBiddle commented 10 years ago

Note sure if this is a true issue, but maybe. Always thought the download speed got sometimes very low for the simple reason of the map depo just being on the other side of the world.

ghost commented 10 years ago

BidyBiddle, ye I thought same like you that mirror admins making some limits or are just slow, so that is why I tested this in my own LAN network (no virtual machines, just 2 computers pluged in to 100 mbit switch) and hard limit seems to be set on 10 mbits/s.

Maybe it is not big issue but many many years ago not many people could notice even 1 mbit limit and internet speed growing from year to year and map makers putting more heavy high resolution textures etc.

Barbatos commented 10 years ago

Interesting patch: https://github.com/ioquake/ioq3/commit/e52a492f615e1245d6d22a84d2cc100c6d2f9f88

Is your cvar cl_cURLlib set?

ghost commented 10 years ago

UPDATE: download limit is related with... com_maxfps value. set for example: com_maxfps 30 and you will get around 600 KB/s and with maxfps 125 you got max around 2 MB/s, Im using max 76 fps (monitor refresh is 75 and is much more smooth)

Barbatos cl_cURLlib is libcurl.so.3, tried libcurl.so.4 etc. doesnt matter.

Ye patch looks nice but it using UDP, tbh my ISP (and maybe some others) using the highest packet priority on UDP packets (it helping with VOIPs, DNS, games pc/xbox/ps etc), so during map downloads it will block all my TCP connections for a while and even it will lag my home urt server for other people (normally I can download torrents with 4k connections reaching max my internet speeds and during that still people on server wont even lag and I can ping other servers and play on them all the time with same low ping cus UDP priority)

anthonynguyen commented 10 years ago

A possible workaround would be to ignore com_maxfps if there's a download running. I have a patch at clearskies/ioq3-for-UrbanTerror-4@bdc7cb95. I'm not sure if it has any unintended side effects, although theoretically, it shouldn't.