Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 493838 - net-proxy/squid-3.3.8/-3.2.13 - runtime configuration directive `maximum_object_size' has no effect
Summary: net-proxy/squid-3.3.8/-3.2.13 - runtime configuration directive `maximum_obje...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Eray Aslan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-10 14:37 UTC by Kai Wüstermann
Modified: 2014-01-04 14:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Wüstermann 2013-12-10 14:37:38 UTC
I can't change the standard maximum_object_size of 4mB in /etc/squid/squid.conf. If you download a object >4mB twice it is not cached, <4mB it is cached, whatever I set between 1mB and 10mB. Currently it is set to 1mB.

------------------------------------
cat /etc/squid/squid.conf

acl SSL_ports port 443
acl Safe_ports port 80		# http
acl Safe_ports port 21		# ftp
acl Safe_ports port 443		# https
acl Safe_ports port 70		# gopher
acl Safe_ports port 210		# wais
acl Safe_ports port 1025-65535	# unregistered ports
acl Safe_ports port 280		# http-mgmt
acl Safe_ports port 488		# gss-http
acl Safe_ports port 591		# filemaker
acl Safe_ports port 777		# multiling http
acl Safe_ports port 901		# SWAT
acl CONNECT method CONNECT

http_access deny !Safe_ports
http_access allow localhost manager
http_access deny manager
http_access allow localhost
http_access deny all

http_port 3128
cache_dir ufs /var/cache/squid 512 16 256
cache_mem 16 MB
maximum_object_size 1 MB
cache_replacement_policy heap LFUDA

coredump_dir /var/cache/squid

refresh_pattern ^ftp:		1440	20%	10080
refresh_pattern ^gopher:	1440	0%	1440
refresh_pattern -i (/cgi-bin/|\?) 0	0%	0
refresh_pattern .		0	20%	4320

--------------------------------------------------
cat /var/log/squid/access.log

1386684252.923    776 ::1 TCP_MISS/200 2151781 GET http://www.dk-content.de/trekkingbike/pdf-archiv/tests/5_13%20Griffe.pdf - HIER_DIRECT/212.8.200.235 application/x-pdf
1386684260.058     86 ::1 TCP_HIT/200 2151790 GET http://www.dk-content.de/trekkingbike/pdf-archiv/tests/5_13%20Griffe.pdf - HIER_NONE/- application/x-pdf
1386684363.943   1779 ::1 TCP_MISS/200 5677589 GET http://www.dk-content.de/trekkingbike/pdf-archiv/tests/0413_Touren-Spezial.pdf - HIER_DIRECT/212.8.200.235 application/x-pdf
1386684380.602   1666 ::1 TCP_MISS/200 5677589 GET http://www.dk-content.de/trekkingbike/pdf-archiv/tests/0413_Touren-Spezial.pdf - HIER_DIRECT/212.8.200.235 application/x-pdf

---------------------------------------------
cat /var/log/squid/cache.log
2013/12/10 15:14:37 kid1| Preparing for shutdown after 97 requests
2013/12/10 15:14:37 kid1| Waiting 1 seconds for active connections to finish
2013/12/10 15:14:37 kid1| Closing HTTP port [::]:3128
2013/12/10 15:14:37 kid1| Closing Pinger socket on FD 18
2013/12/10 15:14:37 kid1| Shutdown: NTLM authentication.
2013/12/10 15:14:37 kid1| Shutdown: Negotiate authentication.
2013/12/10 15:14:37 kid1| Shutdown: Digest authentication.
2013/12/10 15:14:37 kid1| Shutdown: Basic authentication.
2013/12/10 15:14:39| Pinger exiting.
2013/12/10 15:14:39 kid1| Shutting down...
2013/12/10 15:14:39 kid1| Closing unlinkd pipe on FD 14
2013/12/10 15:14:39 kid1| storeDirWriteCleanLogs: Starting...
2013/12/10 15:14:39 kid1|   Finished.  Wrote 32 entries.
2013/12/10 15:14:39 kid1|   Took 0.00 seconds (106666.67 entries/sec).
2013/12/10 15:14:39 kid1| Logfile: closing log daemon:/var/log/squid/access.log
2013/12/10 15:14:39 kid1| Logfile Daemon: closing log daemon:/var/log/squid/access.log
2013/12/10 15:14:39 kid1| Open FD UNSTARTED     7 DNS Socket IPv6
2013/12/10 15:14:39 kid1| Open FD READ/WRITE    8 DNS Socket IPv4
2013/12/10 15:14:39 kid1| Open FD UNSTARTED     9 IPC UNIX STREAM Parent
2013/12/10 15:14:39 kid1| Squid Cache (Version 3.3.8): Exiting normally.
2013/12/10 15:14:40 kid1| Starting Squid Cache version 3.3.8 for x86_64-pc-linux-gnu...
2013/12/10 15:14:40 kid1| Process ID 4073
2013/12/10 15:14:40 kid1| Process Roles: worker
2013/12/10 15:14:40 kid1| With 1024 file descriptors available
2013/12/10 15:14:40 kid1| Initializing IP Cache...
2013/12/10 15:14:40 kid1| DNS Socket created at [::], FD 7
2013/12/10 15:14:40 kid1| DNS Socket created at 0.0.0.0, FD 8
2013/12/10 15:14:40 kid1| Adding domain local from /etc/resolv.conf
2013/12/10 15:14:40 kid1| Adding nameserver 192.168.1.1 from /etc/resolv.conf
2013/12/10 15:14:40 kid1| Logfile: opening log daemon:/var/log/squid/access.log
2013/12/10 15:14:40 kid1| Logfile Daemon: opening log /var/log/squid/access.log
2013/12/10 15:14:40 kid1| Unlinkd pipe opened on FD 14
2013/12/10 15:14:40 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2013/12/10 15:14:40 kid1| Store logging disabled
2013/12/10 15:14:40 kid1| Swap maxSize 524288 + 16384 KB, estimated 41590 objects
2013/12/10 15:14:40 kid1| Target number of buckets: 2079
2013/12/10 15:14:40 kid1| Using 8192 Store buckets
2013/12/10 15:14:40 kid1| Max Mem  size: 16384 KB
2013/12/10 15:14:40 kid1| Max Swap size: 524288 KB
2013/12/10 15:14:40 kid1| Rebuilding storage in /var/cache/squid (clean log)
2013/12/10 15:14:40 kid1| Using Least Load store dir selection
2013/12/10 15:14:40 kid1| Set Current Directory to /var/cache/squid
2013/12/10 15:14:40 kid1| Loaded Icons.
2013/12/10 15:14:40 kid1| HTCP Disabled.
2013/12/10 15:14:40 kid1| Pinger socket opened on FD 19
2013/12/10 15:14:40 kid1| Squid plugin modules loaded: 0
2013/12/10 15:14:40 kid1| Accepting HTTP Socket connections at local=[::]:3128 remote=[::] FD 17 flags=9
2013/12/10 15:14:40 kid1| Done reading /var/cache/squid swaplog (32 entries)
2013/12/10 15:14:40 kid1| Finished rebuilding storage from disk.
2013/12/10 15:14:40 kid1|        32 Entries scanned
2013/12/10 15:14:40 kid1|         0 Invalid entries.
2013/12/10 15:14:40 kid1|         0 With invalid flags.
2013/12/10 15:14:40 kid1|        32 Objects loaded.
2013/12/10 15:14:40 kid1|         0 Objects expired.
2013/12/10 15:14:40 kid1|         0 Objects cancelled.
2013/12/10 15:14:40 kid1|         0 Duplicate URLs purged.
2013/12/10 15:14:40 kid1|         0 Swapfile clashes avoided.
2013/12/10 15:14:40 kid1|   Took 0.01 seconds (2186.99 objects/sec).
2013/12/10 15:14:40 kid1| Beginning Validation Procedure
2013/12/10 15:14:40 kid1|   Completed Validation Procedure
2013/12/10 15:14:40 kid1|   Validated 32 Entries
2013/12/10 15:14:40 kid1|   store_swap_size = 2276.00 KB
2013/12/10 15:14:40| pinger: Initialising ICMP pinger ...
2013/12/10 15:14:40| pinger: ICMP socket opened.
2013/12/10 15:14:40| pinger: ICMPv6 socket opened
2013/12/10 15:14:41 kid1| storeLateRelease: released 0 objects

------------------------------------
emerge --info squid
Portage 2.2.7 (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.16.0, 3.10.7-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.10.7-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q8200_@_2.33GHz-with-gentoo-2.2
KiB Mem:     4047844 total,   1390572 free
KiB Swap:    4723036 total,   4723036 free
Timestamp of tree: Mon, 09 Dec 2013 15:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r3, 3.2.5-r3, 3.3.2-r2
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo science
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE PUEL dlj-1.1 AdobeFlash-11.x"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/latex2html /usr/share/gnupg/qualified.txt /usr/share/texmf-site/tex/latex/html /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" -j4  --load-average 4"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo/ ftp://de-mirror.org/distro/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cupsddk cxx dbus device-mapper dri dts dvd dvdr dvi emboss encode exif fam firefox flac fortran g3dvl gdbm gdu gif gimp glitz gnutls gpm gstreamer gtk hddtemp hpijs hunspell iconv ipv6 java jpeg latex lcms libnotify lm_sensors lyx mad midi mmx mng modules mono mp3 mp4 mpeg mtp mudflap multilib ncurses nls nptl nsplugin nvidia odbc odf ogg opencl opengl openmp pam pango pcre pdf pmu png policykit ppds python qt3support raw readline scanner sdl session smp spell sse sse2 ssl startup-notification svg symlink tcpd theora thunar tiff truetype udev udisks unicode upower usb vdpau vorbis win32codecs wmf wxwidgets x264 xcb xinerama xml xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias auth_digest" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="epson2 net" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

net-proxy/squid-3.3.8 was built with the following:
USE="ipv6 pam ssl -caps -ecap -icap-client (-ipf-transparent) -kerberos (-kqueue) -ldap -logrotate -mysql -nis (-pf-transparent) -postgres -qos -radius -samba -sasl (-selinux) -snmp -sqlite -ssl-crtd -test -tproxy"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-10 18:58:19 UTC
(In reply to Kai Wüstermann from comment #0)
> I can't change the standard maximum_object_size of 4mB in

I'm not sure milli-bytes (or -bel?) was what you intended here.
Comment 2 Kai Wüstermann 2013-12-11 16:39:20 UTC
(In reply to Jeroen Roovers from comment #1)
> (In reply to Kai Wüstermann from comment #0)
> > I can't change the standard maximum_object_size of 4mB in
> 
> I'm not sure milli-bytes (or -bel?) was what you intended here.

Of course this is MegaByte.
Comment 3 Eray Aslan gentoo-dev 2014-01-04 11:53:31 UTC
cache_dir max-size and maximum_object_size interact with each other in somewhat non-obvious ways:

http://www.squid-cache.org/Doc/config/cache_dir/
http://www.squid-cache.org/Doc/config/maximum_object_size/

Try specifying max-size for the cache_dir and/or re-ordering cache_dir and maximum_object_size settings.
Comment 4 Kai Wüstermann 2014-01-04 14:02:22 UTC
Thank you,

I set both options to the same value now it is working.

cache_dir ufs /var/cache/squid 512 16 256 max-size=10485760
maximum_object_size 10485760