Just how good is Squid?



  • I have a WiSP and it is very expensive for bandwidth here.  I am using squid as a trasnparent proxy to try and cache as much as possible.  I just want to know from more experienced users just how good using squid cache actually is?  I mean, i can look at a days usage in Lightsquid and it shows that 16% of all traffic came from cache.. how correct it this?  Does that really mean that i saved 16%  or all daily bandwidth used?

    Also, maybe i am wrong, but going through lightsquid  logs and doing my own tests, it doesnt seem to cache torrent downloads?  I have a few users that i know download alot using BitTorrent but i dont see their usage as high in the Lightsquid logs..

    Lastly, that dreaded swap.state file.. i have tried for months to work out how to get that log to not grow huge, i have set the log rotate to 1 day, but it still grows and grows until i manually log in and rm swap.state, is there any way at all to not make this file a major problem?  it gets so huge that ig makes my hard drive space completely used up, and i have a 1.5tb drive for cache.



  • Hi,

    transparent proxy only proxies port 80 (http). So it is not possible to cache other protocols like bittorrent and so on. That's the way why you cannot see the bittorrent download. Probably you can see the download of the .torrent file from the webserver but not the torrent download itself.

    If you swap.state growth then your cache grwoths.
    http://wiki.squid-cache.org/SquidFaq/SquidLogs#swap.state

    How big is your HDD cache and how much memory do you have ?



  • Is there any way that Squid can cache all traffic and not just port 80?

    The HDD cache is 1.5tb, and the server has 8gb memory



  • @luke240778:

    Is there any way that Squid can cache all traffic and not just port 80?

    No, squid can cache only http traffic.



  • as a transparent proxy, it can only cache http traffic.. nothing more nothing less. Are your running squid2 or the squid3 package? There were some changes recently to the squid2 package that should clear up your swap.state issue.



  • @luke240778:

    Is there any way that Squid can cache all traffic and not just port 80?

    (…)

    In transparent mode the only possibility is caching http (port 80) traffic.
    If squid is running in non-transparent mode you can cache https (443) and as far as I know ftp (21). But for this it is absolutly neccessary that your customers enter your squid proxy in there browser options.

    HDD:
    You have a built-in HDD of 1.5TB.
    Did you assign all of the HDD space to squid or just - for example- 500GB for squid ?
    Please take a look here:
    http://wiki.squid-cache.org/SquidFaq/SquidMemory#Why_does_Squid_use_so_much_memory.21.3F

    If you assign 500GB of HDD to squid than squid needs 500 * 14MB (64bit) = 750MB just for the HDD cache. Just to know "where do I find what on the HDD"

    But to your swap.state. It gets beigger if the HDD cache is bigger (or more of the space is used). Log rotate should keep the file small. As Cino said - there where some changes from jimp which should fix some problems with "log rotate" on squid.

    Hope this will help you in any way.



  • athanks for your replies.  I am using Squid 2 still, as i wasnt sure if Squid 3 was a good idea to use yet or not.  I have set log rotate to 1 day in the squid settings, but i still see the swap.state file getting huge, and i dont see it rotating daily as it says it shuld.  Sometimes it also seems to leave the swap.state file there and create a swap.state.new file.. which i cant understand as it should delete the old and creata a new right?  otherwise its not saving space at all, but actually eating more.



  • The improvements I talked of are for squid2. Not squid3! Just to make sure that we do not misunderstand :-)



  • Yes that is what i understood.. which is why it is strange that i am using Squid2 and still having this problem


Log in to reply