bundles/unbound: better caching
This commit is contained in:
parent
5935aed0db
commit
5e45efb7ae
2 changed files with 11 additions and 2 deletions
|
@ -17,15 +17,19 @@ defaults = {
|
|||
},
|
||||
'unbound': {
|
||||
'max_ttl': 3600,
|
||||
'cache_size': '512M',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
def cpu_cores_to_threads(metadata):
|
||||
def cpu_cores_to_config_values(metadata):
|
||||
num_cpus = metadata.get('vm/cpu', 1)
|
||||
|
||||
return {
|
||||
'unbound': {
|
||||
'threads': metadata.get('vm/cpu', 1)*2,
|
||||
'threads': num_cpus*2,
|
||||
'cache_slabs': 2**(num_cpus-1).bit_length(),
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue