Throttling Streaming Media with Lusca (cacheboy)?

  • I have read that it is possible to do this, but I guess I need help figuring out just how to go about doing it. I have been searching for days now and I keep finding conflicting information on it. I have read that in order to throttle the streaming media, I need to use mime types. I have also read that this isn't possible, and most information I have found
    is for blocking based on Mime types.

    I have tried several different methods to do this using pfsense's traffic shaper, using squid's traffic management, etc… and finally installed lusca as i had read on this forum that
    it's possible to do this. I tried entering some acls and delay pool to the include.conf which seems to have no effect whatsoever.

    Am I just going about this the wrong way? Or is it just that I'm not configuring the acls, delay pools, or both? The main site people here go to is youtube, but then there are a lot of other random places that gets streamed.

    We are on a T1 line with about 14 hosts on the network, and every time one or two people watch a video the network slows to a crawl, causing peoples pages not to load etc...
    Blocking is not an option, as both of the owners watch videos online as well.

  • AFAIK, lusca/cacheboy is for caching, not throttling.

    Maybe it would be better to use Traffic Limiters to set limits on the upload/download speeds of your heavy users so their network activities do not make your network crawl.  Put the hosts in a group alias, and for example, set 512Kbps max up & down for the group.  This would leave the remaining 1Mbps free for your other  hosts.

  • Hi, thank's for the reply. Here is one of the threads I found that gave me the impression it would do the throttling: (The last post in particular.) However from what I have read, the one user's suggestion of using the .flv file extension will not work as it's not in the url. Hence the need for mime-types.,16624.msg97154.html#msg97154

    I believe I have also read in some other posts that it is possible, but haven't seen any more details as far as how to go about it. I've been trying to read up more on how squid works, and looking into differences in configuring Lusca from the normal squid packages. I gave up on the squid package since you can't manually edit the squid.conf and the is a little above my knowledge set.

  • Hello,

    take a look on this link.

  • @mikesamo:


    take a look on this link.

    Thanks for the reply. Unfortunately I've already read the documentation on the delay pools. My issue is I want to throttle streaming media. It seems to be fairly simple to throttle hosts (have done this with the limiters as well), I'd like users to have all available bandwidth for normal web browsing, and just throttle the streaming media, and large downloads. I think I can manage the large downloads part ok, it's the other aspect I can't figure out.

    As an example, here is what I have added to the include.conf of lusca in /usrs/local/etc/squid:

    **#ACL for throttling streaming

    acl streaming_media rep_mime_type ^application/
    acl streaming_media rep_mime_type ^application/x-fcs
    acl streaming_media rep_mime_type ^application/x-mms-framed
    acl streaming_media rep_mime_type ^video/x-ms-asf
    acl streaming_media rep_mime_type ^audio/mpeg
    acl streaming_media rep_mime_type ^audio/x-scpls
    acl streaming_media rep_mime_type ^video/x-flv
    acl streaming_media rep_mime_type ^video/x-shockwave-flash
    acl streaming_media rep_mime_type ^video/mpeg4
    acl streaming_media2 req_mime_type ^application/x-fcs

    #delay pools for streaming
    delay_pools 1
    delay_class 1 1
    delay_access 1 allow streaming_media2
    delay_access 1 allow streaming_media
    delay_access 1 deny  all
    delay_parameters 1 64000/64000**
    I got the mime type parts from someone elses config posted online. And then created my pool for them.

  • If no one around her can help with this, can anyone at least point me to a forum where I might be able to get help with this? I am reading through the squid documentation to try to learn it better, but I don't know if there might be anything different with the Lusca fork that might be relevant here. I tried messaging chudy, but then realized he hasn't had any activity here in quite some time. I tried going to the pfsense lusca site, but couldn't see anyway to contact him there, or any time of forum associated with it.

  • just use layer 7 filter with limiter.

  • @mikesamo:

    just use layer 7 filter with limiter.

    Thanks for the reply. I've set up the L7 filtering and it seems to be working well at keeping the videos down to a reasonable level. Is it possible to filter all binary downloads with the layer 7 filter on pfsense as well? I noticed ".EXE" in the list, and have it selected but I've noticed downloads from an adobe update site that cause our bandwidth to max out for a couple of minutes and at least in adobe reader there is no option to change update schedule.