This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is it possible to change the MAX size of cached objects?

I just noticed that squid is not caching large files (>2MB?).  After scanning the docs at squid.org I didnt find exactly what I was looking for, and i didnt see any configuration options in the squid.conf-default file.   [:S] 

While i am on this subject, how about caching FTP GET request?  

----------------- cut -----------------

A Miss/Hit from my logs. As u can see a 6MB file missed both times.

700KB FILE 

1024052762.053  12640 10.1.2.99 TCP_MISS/200 739881 GET http://primacom.tucows.com/files2/BisonFTP42.exe - DIRECT/62.208.91.21 application/x-msdos-program

1024052824.873   4143 10.1.2.99 TCP_HIT/200 739881 GET http://primacom.tucows.com/files2/BisonFTP42.exe - NONE/- application/x-msdos-program

6MB FILE 

1024053985.384  76408 10.1.2.99 TCP_MISS/200 6810451 GET http://primacom.tucows.com/files2/CPRoxy.zip - DIRECT/62.208.91.21 application/zip

1024054348.402  77926 10.1.2.99 TCP_MISS/200 6810451 GET http://primacom.tucows.com/files2/CPRoxy.zip - DIRECT/62.208.91.21 application/zip

----------------- cut -----------------


This thread was automatically locked due to age.
Parents
  • You are looking for maximum_object_size which has a syntax like this
    maximum_object_size 4096 KB
    and is set to 4096kilobytes by default, hence the reason your 6meg files are not being cached. If you want to change this you'll need to add it to /var/chroot-squid/etc/squid.conf-default I belive and restart your firewall. You can check about these sorta things in /var/chroot-squid/etc/reference-squid.conf which is the original annoted version of squid.conf that ships with squid. Hope this helps. For easy reference, here is the notes from squid.conf about maximum_object_size:

    TAG: maximum_object_size     (bytes)
    Objects larger than this size will NOT be saved on disk.  The value is specified in kilobytes, and the default is 4MB.  If you wish to get a high BYTES hit ratio, you should probably increase this (one 32 MB object hit counts for 3200 10KB hits).  If you wish to increase speed more than your want to save bandwidth you should leave this low.
    NOTE: if using the LFUDA replacement policy you should increase this value to maximize the byte hit rate improvement of LFUDA! See replacement_policy below for a discussion of this policy.
    #maximum_object_size 4096 KB
  • Hi - I have changed mine to 50Mb - are they any issues with this?

    Also, are there any plans to include this as an option in the Astaro admin area?

    Mark
  • Actually you just have to stop and start the Squid proxy via WebAdmin. You don't need to restart the whole firewall.
  • Newbie question:  How do you edit hte .conf file to increase the max object size? 
  • William,

    after you mutated to root you have the choice between vi or joe as
    text editor. joe is pretty easy, just press CTRL K+H to get the helpscreen.

    Greetings
    cyclops
       
  • ok..complete newbie here:  how do i access those programs??.. 
  • Hi William,

    you should read FAQ first before you post such kind of question. 

    for you question, you need a ssh client to connect your astaro box, and su to root.

    pls do ask us how to use ssh client!
     
  • Denny, easy, guy. The guy admitted he's a noob, weren't we all noobs once.

    Login to your firewall using an ssh client (I use ZOC on windows but PuTTY I believe works just as well) using the "loginuser" ID.

    Once logged in "su" to root...
    ASL> su -
    Password: 

    Open the .conf file in "joe".
    ASL> joe /var/chroot-squid/etc/squid.conf-default

    As the above article suggests, look at the /var/chroot-squid/etc/reference-squid.conf file first since it has all the original annotations regarding the different options contained in the file. 
  • my reference conf file is blank....where do i add the max object size tag in the default conf file for squid? 
  • You'll see an entry for maximum_object_size. It may have a "#" in front of it to comment it out. Without specifying a value, the default is 4096 KB. Use the maximum_object_size  option as such...
    maximum_object_size 8192 KB
    You might also consider this web resource and try fiddleing around with some of the settings. Just be sure to create a copy of yout squid.conf-default beforehand.

    http://squid.visolve.com/squid24s1/contents.htm
  • That is what is puxxling..i do not have that entry in my conf-default

    no max file anything do i need to just reinstall astaro from scratch?

    Here are hte contents of my squid.conf-default file:
        IW   /var/chroot-squid/etc/squid.conf-default       Row 103  Col 1    5:36  Ctrl-K H for help
    visible_hostname 
    memory_pools off
    forwarded_for off
    query_icmp off
    test_reachability off
    buffered_logs off
    buffered_logs on
    anonymize_headers deny Accept-Encoding
    anonymize_headers deny Accept-Encoding
    anonymize_headers deny From Referer Server
    anonymize_headers deny User-Agent WWW-Authenticate Link
    anonymize_headers allow Allow Authorization Cache-Control
    anonymize_headers allow Content-Encoding Content-Length
    anonymize_headers allow Content-Type Date Expires Host
    anonymize_headers allow If-Modified-Since Last-Modified
    anonymize_headers allow Location Pragma Accept
    anonymize_headers allow Accept-Language
    anonymize_headers allow Content-Language Mime-Version
    anonymize_headers allow Retry-After Title Connection
    anonymize_headers allow Proxy-Connection
    fake_user_agent Nutscrape/1.0 (CP/M; 8-bit)
    icon_directory /etc/icons
    error_directory /etc/errors
    snmp_port 3401
    acl snmppublic src 127.0.0.1/255.255.255.255
    snmp_access allow snmppublic
    snmp_access deny all
    snmp_incoming_address 127.0.0.1
    snmp_outgoing_address 255.255.255.255
    redirector_bypass off
    ignore_unknown_nameservers off
    ie_refresh on

     
  • Just add it somewhere near the top. No big deal. Remember, if it isn't specified, Squid uses the default of 4096 KB. 
Reply Children