Commit b3888897 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

apache-frontend: ram and disk cache size are configurable

parent 60005c3d
...@@ -39,6 +39,12 @@ will request the third frontend on COMP-1234. All frontends will be of software ...@@ -39,6 +39,12 @@ will request the third frontend on COMP-1234. All frontends will be of software
Note: the way slaves are transformed to a parameter avoid modifying more than 3 lines in the frontend logic. Note: the way slaves are transformed to a parameter avoid modifying more than 3 lines in the frontend logic.
Important NOTE: The way you ask for slave to a replicate frontend is the same as the one you would use for the software given in "-frontend-quantity". Do not forget to use "replicate" for software type. XXXXX So far it is not possible to do a simple request on a replicate frontend if you do not know the software_guid or other sla-parameter of the master instance. In fact we do not know yet the software type of the "requested" frontends. TO BE IMPLEMENTED Important NOTE: The way you ask for slave to a replicate frontend is the same as the one you would use for the software given in "-frontend-quantity". Do not forget to use "replicate" for software type. XXXXX So far it is not possible to do a simple request on a replicate frontend if you do not know the software_guid or other sla-parameter of the master instance. In fact we do not know yet the software type of the "requested" frontends. TO BE IMPLEMENTED
XXX Should be moved to specific JSON File
Extra-parameter per frontend with default :
ram-cache-size = 1G
disk-cache-size = 8G
How to deploy a frontend server How to deploy a frontend server
=============================== ===============================
......
...@@ -67,7 +67,7 @@ mode = 0644 ...@@ -67,7 +67,7 @@ mode = 0644
[template-apache-frontend] [template-apache-frontend]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-frontend.cfg url = ${:_profile_base_location_}/instance-apache-frontend.cfg
md5sum = 986988ed3a357f87fc023e14d87dcc5c md5sum = 66a4c824a9f9a9995e1699549b941656
output = ${buildout:directory}/template-apache-frontend.cfg output = ${buildout:directory}/template-apache-frontend.cfg
mode = 0644 mode = 0644
...@@ -160,7 +160,7 @@ md5sum = 8cde04bfd0c0e9bd56744b988275cfd8 ...@@ -160,7 +160,7 @@ md5sum = 8cde04bfd0c0e9bd56744b988275cfd8
[template-trafficserver-records-config] [template-trafficserver-records-config]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/templates/trafficserver/${:filename} url = ${:_profile_base_location_}/templates/trafficserver/${:filename}
md5sum = 5fe62579fed44244b8e6b220bc598597 md5sum = a892d3e71988a8293e44382cbf10810f
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = records.config.jinja2 filename = records.config.jinja2
download-only = true download-only = true
......
...@@ -120,6 +120,7 @@ configuration.apache-key = ...@@ -120,6 +120,7 @@ configuration.apache-key =
configuration.apache-certificate = configuration.apache-certificate =
configuration.open-port = 80 443 configuration.open-port = 80 443
configuration.extra_slave_instance_list = configuration.extra_slave_instance_list =
configuration.disk-cache-size = 8G
[frontend-configuration] [frontend-configuration]
template-log-access = ${template-log-access:target} template-log-access = ${template-log-access:target}
...@@ -456,7 +457,7 @@ local-ip = $${instance-parameter:ipv4-random} ...@@ -456,7 +457,7 @@ local-ip = $${instance-parameter:ipv4-random}
input-port = 23432 input-port = 23432
hostname = $${slap-parameter:frontend-name} hostname = $${slap-parameter:frontend-name}
remap = map / http://$${instance-parameter:ipv4-random}:$${apache-configuration:cache-through-port} remap = map / http://$${instance-parameter:ipv4-random}:$${apache-configuration:cache-through-port}
disk-cache-config = $${trafficserver-directory:cache-path} 8G volume=$${slap-parameter:frontend-name} disk-cache-config = $${trafficserver-directory:cache-path} $${instance-parameter:configuration.disk-cache-size} volume=$${slap-parameter:frontend-name}
plugin-config = ${trafficserver:location}/libexec/trafficserver/rfc5861.so plugin-config = ${trafficserver:location}/libexec/trafficserver/rfc5861.so
[trafficserver-configuration-directory] [trafficserver-configuration-directory]
...@@ -481,7 +482,7 @@ environment = TS_ROOT=$${buildout:directory} ...@@ -481,7 +482,7 @@ environment = TS_ROOT=$${buildout:directory}
template = ${template-trafficserver-records-config:location}/${template-trafficserver-records-config:filename} template = ${template-trafficserver-records-config:location}/${template-trafficserver-records-config:filename}
rendered = $${trafficserver-directory:configuration}/records.config rendered = $${trafficserver-directory:configuration}/records.config
mode = 700 mode = 700
context = extra-context =
import os_module os import os_module os
section ats_directory trafficserver-directory section ats_directory trafficserver-directory
section ats_configuration trafficserver-variable section ats_configuration trafficserver-variable
......
...@@ -331,8 +331,7 @@ CONFIG proxy.config.cache.permit.pinning INT 0 ...@@ -331,8 +331,7 @@ CONFIG proxy.config.cache.permit.pinning INT 0
# default the ram cache size to AUTO_SIZE (-1) based on cache size # default the ram cache size to AUTO_SIZE (-1) based on cache size
# (approximately 10 MB of RAM cache per GB of disk cache) # (approximately 10 MB of RAM cache per GB of disk cache)
# alternatively, set to a fixed value such as 21474836480 (20GB) # alternatively, set to a fixed value such as 21474836480 (20GB)
CONFIG proxy.config.cache.ram_cache.size INT 1G CONFIG proxy.config.cache.ram_cache.size INT {{ slapparameter_dict.get('ram-cache-size', '1G') }}
CONFIG proxy.config.cache.ram_cache_cutoff INT 4194304
# Replacement algorithm # Replacement algorithm
# 0 : Clocked Least Frequently Used by Size (CLFUS) w/optional compression # 0 : Clocked Least Frequently Used by Size (CLFUS) w/optional compression
# 1 : LRU w/o optional compression - trivially simple # 1 : LRU w/o optional compression - trivially simple
...@@ -366,9 +365,6 @@ CONFIG proxy.config.cache.target_fragment_size INT 1048576 ...@@ -366,9 +365,6 @@ CONFIG proxy.config.cache.target_fragment_size INT 1048576
CONFIG proxy.config.cache.max_doc_size INT 0 CONFIG proxy.config.cache.max_doc_size INT 0
# enable the cache to read from an object while it is being added to the cache # enable the cache to read from an object while it is being added to the cache
CONFIG proxy.config.cache.enable_read_while_writer INT 0 CONFIG proxy.config.cache.enable_read_while_writer INT 0
# This controls how many objects (average) the disk caches can hold, and
# how much memory it'll consume for the directory structure.
CONFIG proxy.config.cache.min_average_object_size INT 8000
# How many I/O threads to allocate per disk (spindle). Be aware that RAID # How many I/O threads to allocate per disk (spindle). Be aware that RAID
# disks would show up to TS as a single spindle. # disks would show up to TS as a single spindle.
CONFIG proxy.config.cache.threads_per_disk INT 8 CONFIG proxy.config.cache.threads_per_disk INT 8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment