Re: Limiting apache's upload speed?

2008-04-15 Thread Ian Smith
In freebsd-questions Digest, Vol 211, Issue 1
On Sun, 13 Apr 2008 Wojciech Puchar [EMAIL PROTECTED] wrote:

(quoting 2 separate messages, one of the occasional joys of digests :)

  ADSL modems (at least this used by polish telecom) tend to choke when 
  upload bandwidth is near max. delays gets even above 1000ms

and

  probably not. at least here with polish telecom's ADSL services, just 
  uploading one thing with ftp somewhere slows everything down, unless 
  traffic management is used

Both are true - I've seen p2p uploads pushing pings towards 3000ms while
I'm trying! to work via ssh from outside - but it's nothing to do with
your ISP/telco in particular; it's just the nature of A(symmetric)DSL.

I'm only using ipfw+dummynet pipes for such so far, but hope to try out
WF2Q+ queuing soon to prioritise traffic so I can ease up on b/w limits. 

cheers, Ian

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Limiting apache's upload speed?

2008-04-14 Thread David Kaye
On  0, Manolis Kiagias [EMAIL PROTECTED] wrote:
 Patsy wrote:
snip

 I do not wish to take my website down and so I was hoping somebody would 
 be able to tell me if it is possible to throttle apache's upload speed. It 
 seems that this would provide a good solution - people will need to wait a 
 little longer to see my page, but a change of waiting 3 seconds to waiting 
 6 seconds isn't terrible.

 My router does not appear to have the option to throttle individual 
 hosts/ports. Any advice on the matter would be appreciated.

 Patsy


 I run something similar here in Greece, but have not noticed any 
 performance problems just yet. You are probably getting a lot of hits!

 What you need is an apache module designed specifically for speed / 
 bandwidth throttling: www/mod_cband

 You may also wish to have a look at these instructions (linux specific, but 
 easy to adjust for FreeBSD):

 http://howtoforge.com/mod_cband_apache2_bandwidth_quota_throttling

 BTW, what is your ADSL speed? You mention upload capacity of 500kb/s, and I 
 suppose you mean kbits/sec, *not* kbytes/sec. Assuming it is kbits, you may 
 well be consuming all your upload bandwidth if for some reason you get more 
 than a few simultaneous connections...

My estimated upload speed is 500kilobits per second. mod_cband seems to do the 
trick perfectly. I set maximum global upload to 400kilobits per second and all 
seems to be working well.

Just as a side note for anyone S'ing the FA's, when I ran:

#pkg_add -r mod_cband

it pulled down a version of mod_cband compiled for Apache 2.0, with Apache 2.0 
therefore being a dependancy, it was pulled down as well. After I removed 2.0, 
I needed to reinstall 2.2 and make mod_cband from ports. None of this was a 
problem, I just thought it should be on the list somewhere.

Many thanks to everybody who responded.

Patsy
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Limiting apache's upload speed?

2008-04-14 Thread Mel
On Tuesday 15 April 2008 00:15:45 David Kaye wrote:

 Just as a side note for anyone S'ing the FA's, when I ran:

 #pkg_add -r mod_cband

 it pulled down a version of mod_cband compiled for Apache 2.0, with Apache
 2.0 therefore being a dependancy, it was pulled down as well. After I
 removed 2.0, I needed to reinstall 2.2 and make mod_cband from ports. None
 of this was a problem, I just thought it should be on the list somewhere.

If you pull packages from FreeBSD servers, then you should expect them to use 
default options (more to the point, the options defined by PACKAGE_BUILDING 
if the port specifies it) and default dependencies.
The default APACHE_PORT is www/apache20. If you use www/apache22, then 
you 'cannot' use those packages.

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Limiting apache's upload speed?

2008-04-13 Thread Patsy

Hello list,

I am running FreeBSD 7.0-RELEASE (GENERIC), I am running Apache 2.2.6_2 
and hosting a small website with a few relatively small (500kB-900kB) 
photographs. I am doing so from a home ADSL connection in the UK and so 
I am estimating my upload capacity at 500kb/s.


When I have apache enabled and serving the web page it seems to disrupt 
my other network programs - on my main computer (running Debian etch) 
Wengophone stutters and my browser slows down noticeably. When apache is 
disabled these problems disappear.


I do not wish to take my website down and so I was hoping somebody would 
be able to tell me if it is possible to throttle apache's upload speed. 
It seems that this would provide a good solution - people will need to 
wait a little longer to see my page, but a change of waiting 3 seconds 
to waiting 6 seconds isn't terrible.


My router does not appear to have the option to throttle individual 
hosts/ports. Any advice on the matter would be appreciated.


Patsy
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Limiting apache's upload speed?

2008-04-13 Thread Jeff Royle

Patsy wrote:

Hello list,

I am running FreeBSD 7.0-RELEASE (GENERIC), I am running Apache 2.2.6_2 
and hosting a small website with a few relatively small (500kB-900kB) 
photographs. I am doing so from a home ADSL connection in the UK and so 
I am estimating my upload capacity at 500kb/s.


When I have apache enabled and serving the web page it seems to disrupt 
my other network programs - on my main computer (running Debian etch) 
Wengophone stutters and my browser slows down noticeably. When apache is 
disabled these problems disappear.


I do not wish to take my website down and so I was hoping somebody would 
be able to tell me if it is possible to throttle apache's upload speed. 
It seems that this would provide a good solution - people will need to 
wait a little longer to see my page, but a change of waiting 3 seconds 
to waiting 6 seconds isn't terrible.


My router does not appear to have the option to throttle individual 
hosts/ports. Any advice on the matter would be appreciated.




I would suggest you look into PF + ALTQ.

ALTQ is a rule based bandwidth control for PF which would allow you to 
adjust how much bandwidth you allow on the port 80.


You will need to enable ALTQ in your kernel as it does not come enabled 
by default.


See pf.conf(5) and altq(4)for more details.

Cheers,

Jeff
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Limiting apache's upload speed?

2008-04-13 Thread Manolis Kiagias

Patsy wrote:

Hello list,

I am running FreeBSD 7.0-RELEASE (GENERIC), I am running Apache 
2.2.6_2 and hosting a small website with a few relatively small 
(500kB-900kB) photographs. I am doing so from a home ADSL connection 
in the UK and so I am estimating my upload capacity at 500kb/s.


When I have apache enabled and serving the web page it seems to 
disrupt my other network programs - on my main computer (running 
Debian etch) Wengophone stutters and my browser slows down noticeably. 
When apache is disabled these problems disappear.


I do not wish to take my website down and so I was hoping somebody 
would be able to tell me if it is possible to throttle apache's upload 
speed. It seems that this would provide a good solution - people will 
need to wait a little longer to see my page, but a change of waiting 3 
seconds to waiting 6 seconds isn't terrible.


My router does not appear to have the option to throttle individual 
hosts/ports. Any advice on the matter would be appreciated.


Patsy



I run something similar here in Greece, but have not noticed any 
performance problems just yet. You are probably getting a lot of hits!


What you need is an apache module designed specifically for speed / 
bandwidth throttling: www/mod_cband


You may also wish to have a look at these instructions (linux specific, 
but easy to adjust for FreeBSD):


http://howtoforge.com/mod_cband_apache2_bandwidth_quota_throttling

BTW, what is your ADSL speed? You mention upload capacity of 500kb/s, 
and I suppose you mean kbits/sec, *not* kbytes/sec. Assuming it is 
kbits, you may well be consuming all your upload bandwidth if for some 
reason you get more than a few simultaneous connections...

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Limiting apache's upload speed?

2008-04-13 Thread Ian Smith
On Sun, 13 Apr 2008 11:41:02 +0100 Patsy [EMAIL PROTECTED] wrote:
  Hello list,
  
  I am running FreeBSD 7.0-RELEASE (GENERIC), I am running Apache 2.2.6_2 
  and hosting a small website with a few relatively small (500kB-900kB) 
  photographs. I am doing so from a home ADSL connection in the UK and so 
  I am estimating my upload capacity at 500kb/s.

Assuming that's 500kbit/s or maybe around 60KBytes/s ..

  When I have apache enabled and serving the web page it seems to disrupt 
  my other network programs - on my main computer (running Debian etch) 
  Wengophone stutters and my browser slows down noticeably. When apache is 
  disabled these problems disappear.

Like Manolis I suspect your outbound bandwidth is often being saturated
serving images.  Unless you leave yourself enough outbound bandwidth for
snappy delivery of requests and acks for inbound sessions, performance
suffers tragically.  Bandwidth limiting apache to maybe 400kbit/s should
leave you plenty of headroom (unless you're uploading torrents too :) 

  I do not wish to take my website down and so I was hoping somebody would 
  be able to tell me if it is possible to throttle apache's upload speed. 
  It seems that this would provide a good solution - people will need to 
  wait a little longer to see my page, but a change of waiting 3 seconds 
  to waiting 6 seconds isn't terrible.
  
  My router does not appear to have the option to throttle individual 
  hosts/ports. Any advice on the matter would be appreciated.

The apache module should do that job.  For a more generic solution (and
perhaps anyway, given some crazed robots will suck down your whole site
xty times a day, if allowed) a firewall with pipe/queue management, like
Jeff's pf+altq, or ipfw+dummynet, can provide more fine-grained control.

cheers, Ian

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Limiting apache's upload speed?

2008-04-13 Thread Wojciech Puchar


My router does not appear to have the option to throttle individual 
hosts/ports. Any advice on the matter would be appreciated.


best option is to use ipfw to manage outbound traffic, with fair sharing 
of bandwidth (possibly giving ack's higher weight, or specially giving 
lower weight to apache outgoing traffic).


set up bandwidth to something below your operator's declared. like 
450kbit/s or less.


ADSL modems (at least this used by polish telecom) tend to choke when 
upload bandwidth is near max. delays gets even above 1000ms

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Limiting apache's upload speed?

2008-04-13 Thread Wojciech Puchar
I run something similar here in Greece, but have not noticed any performance 
problems just yet. You are probably getting a lot of hits!


probably not. at least here with polish telecom's ADSL services, just 
uploading one thing with ftp somewhere slows everything down, unless 
traffic management is used

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]