The max_in setting limits the incoming per-channel rate, max_speed the outgoing rate. To use max_speed, you must also set "thread_in false". You can also specify these limits per-user in access.conf (See http://www.netwinsite.com/dnews/access.htm), but that complicates matters more.
So, simply divide 500GB in to seconds per month, and divide by ten to accomodate your peers.
536870912000B / 2592000s = 207126bs^-1
Setting max_in and max_speed to 20712 will therefore allow at most, 500GB of data throughput in each direction per month with 10 peers.
Note, this makes certain assumptions that you must be aware of. The figures assume a 30 day month. No allowance is made for TCP/IP overhead (Including retransmission resulting from packet loss), and assumes 100% utilisation of the link at all times. News servers spend significant periods of time looking up indexes, so the above figure may fall well short of 500GB per month, or network factors could put you well over the limit, particularly if you or your peers don't have high reliability networks (E.g. peers on ADSL connections would be a bad choice). If remaining under 500GB is absolutely essential, you should consider the use of packet filtering hardware or abilities of your OS. These can control packet flow, while DNews only knows about how much data is sent, not what is necessary to get to the remote server.
- Roydon L.
[EMAIL PROTECTED] wrote:
I am confused, it seems max speed would do this based on what you said below? If per channel and I have ten peers, what should each be set to to stay within my limit?
Also how would this be done in access.conf or newsfeeds.conf.
Let meknow Thanks
DNews doesn't have a method to restrict overall bandwidth use, only limit on a per-channel basis. The information is stored for each channel, not centrally, so it wouldn't be a simple process to add an additional overall limit to the code.
Your best approach would be to do this using packer filtering so you can limit overall traffic (E.g. using pf or ipfw, iptables on Linux may be able to do this too). This would waste bandwidth if you assumed the link was constantly used to the maximum at times when it wasn't.
If you create user accounts, you can limit users to a daily quota, and just apply rate limiting to the incoming feed(s). This can be done in DNews in either access.conf, or for all channels in dnews.conf by setting 'max_speed' in characters per second.
