Bug 37381

Summary: squid cache should be configured via ucr
Product: UCS Reporter: Tobias Birkefeld <birkefeld>
Component: SquidAssignee: Felix Botner <botner>
Status: CLOSED FIXED QA Contact: Daniel Tröder <troeder>
Severity: enhancement    
Priority: P5 CC: ebersbach, gohmann, grandjean, michelsmidt, schwardt
Version: UCS 3.2   
Target Milestone: UCS 4.1-4-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: Bug Report What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 3: Will affect average number of installed domains How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069 Enterprise Customer affected?:
School Customer affected?: Yes ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional): Forked for project
Max CVSS v3 score:

Description Tobias Birkefeld univentionstaff 2014-12-17 18:15:35 CET
Squid can not be configured via ucr variable to use another cache directory or a smaller/bigger cache size. This would be nice and helpful in large environments.

ucr set squid/cache/size
ucr set squid/cache/l1_size
ucr set squid/cache/l2_size
ucr set squid/cache/directory

more info about cache_dir http://www.squid-cache.org/Doc/config/cache_dir/
Comment 1 Michael Grandjean univentionstaff 2016-08-22 15:10:12 CEST
Our default is still:

> cache_dir ufs /var/spool/squid3 256 16 256

Which means:
- "ufs" is the default Squid storage format
- /var/spool/squid3 will be used as cache directory
- the cache directory size is limited to 256 MB of disk space
- there will be 16 first-level subdirectories
- there will be 256 second-level subdirectories

256 MB doesn't seem much when it comes to web content nowadays. Every UCS@school slave I came across in the last weeks hit that limit (/var/spool/squid3 using around ~ 250 MB of disk space while the HIT rates in access.log were really low).

It would definitely help a lot if increasing the cache dir size would not require to fork the UCR template.
Comment 2 Felix Botner univentionstaff 2016-11-14 11:32:36 CET
added 
 squid/cache/format?ufs
 squid/cache/directory?/var/spool/squid3
 squid/cache/size?512
 squid/cache/l1_size?16
 squid/cache/l2_size?256

univention-squid.yaml 9.0.2-3.237.201611141120

merged to 4.2-0
Comment 3 Daniel Tröder univentionstaff 2016-11-16 15:40:40 CET
OK: code
OK: advisory
OK: manual tests
OK: merge to 4.2
Comment 4 Philipp Hahn univentionstaff 2016-11-23 14:34:18 CET
<http://errata.software-univention.de/ucs/4.1/332.html>