Click to See Complete Forum and Search --> : Strange bandwith issue


ruwach
09-28-2004, 12:48 PM
Hello there, i am running Arch Linux with Apache web serving. And heres the deal.

I am serving some large files from my http page. (60meg audio files) and when someone downloads one of the files from the web page, my internet connection is really effected and becomes slow. Even dillo loads pages somewhat slower than it should. I am on a cable modem. The funny thing is, when a file transfer is in progress, gkrellm and torsmorc only show my upload speed to be between 12 and 26k/s thats not much right? i have a 10 mbps ethernet card that i connect to the net with.
i have another ethernet card that i use to route internet to a laptop via crossover ethernet cable. works great. when i download from that laptop from the webpage on this computer, it is fast as all get out.
I am wondering what my speed stuff should be. If there is a setting that allows me to serve files faster to the web. maybe i should switch the cards, i dont know. Any suggestions?

ph34r
09-28-2004, 01:03 PM
Your upstream connection speed on the cable modem is probably only 128k or 256k. With 128k, that 12K/sec upload is about right.

ruwach
09-28-2004, 01:19 PM
isn't that a little slow?
what does that mean, i am actually serving at 12k/sec or 128k/sec ?
thanks for your quick response.

hard candy
09-29-2004, 08:50 AM
Yes, the cable internet provider figures the average user is using cable internet to download lage media, etc files faster. The upload speed is only used for queries and email usually. They make it slow to protect their bandwidth- can you imagine if all their users were uploading media files at the same time?
You'll need to either pay for the provider to increase your upload speed by becoming a "server/business" instead of a "user", use a hosting company, or live with slow upload speed.

hard candy
09-29-2004, 09:55 AM
I just thought of another way to get around the bandwidth issue. If you are are having a lot of downloads, how about using bittorrent? Or using peer to peer?

ruwach
09-29-2004, 11:29 AM
bittorrent would be ideal, problem is, these files are mp3 audio files of hour long classes that i teach. My students are not so tech savy. Like i am :rolleyes: so i guess that what i have will have to do. i may upgrade if i get more traffic. i only get about 6 hits a day right now. i just didn't want it to take so long for them to download something.
thanks for your info

hard candy
09-29-2004, 11:50 AM
Any way of using the school's server?

jymbo
09-29-2004, 02:00 PM
Like most cable/dsl services, the bandwidth you purchased is asynchronous...meaning, you have lots of bandwidth for downloading, but a miniscule fraction of that amount dedicated to uploads. When your upload is saturated by your Apache server, then your browser requests (whenever you surf) have no way of getting out (they do eventually, but only after a long delay.) What you need to do (aside from hosting your mp3 files somewhere else) is to throttle your outgoing bandwidth.

Let's say your max upstream is 26K. You can reserve 6K of that for yourself, leaving 20K for serving.

Bandwidth throttling leaves you a couple of options. You could use the wondershaper CBQ script, but that may be a little complicated. What I'd recommend is installing an FTP server alongside your Apache server. Store the files on the Ftp server with a link to them on your website page. Then depending on what Ftp server you install, simply enable the bandwidth throttling feature...for instance:

(taken from vsftpd config)
anon_max_rate 10000
max_clients 2

This would tell vsftpd to allow only 2 anonymous users at a time with a max upload rate of 10K each. This means no more than 2 people at a time can d/l the file at a rate no faster than 10K. If you've got 2 users d/ling the file concurrently at max 10K each, you'll still have 6K left for yourself to surf.

If you need to host more than 2 users concurrently, you can split the bandwidth up evenly across all users, but make sure not to go over that buffer you've created for yourself.

ruwach
09-30-2004, 02:27 PM
yeah, i think i will do just that. been looking for a new twist to put more control in this thing. I think an FTP server is just what i need. Now off to google to see what to do !
thanks