Search |
||
Overload Protection in SailFinPosted by rampsarathy on July 25, 2008 at 1:28 AM PDT
SailFin has an Overload protection system that would get triggered if certain system attributes like the memory/CPU utilization increases beyond a certain pre-configured threshold. The "Overload Protection Manager (OLP) " is implemented as a pluggable layer in SailFin, which enables it to be easily inserted and configured. The OLP, when enabled intercepts every request/response (SIP/Http) that enters SailFin and allows it to be processed only if the system is within the configured threshold values. A 503 response is returned back to the client if the request enters the system which is already overloaded either because of CPU or memory utilization. The OLP layer interception happens as soon as the request is parsed and framed, and this early interception guarantees that it consumes the least possible resources while accomplishing its functionality. The OLP functionlity is disabled by default in the SailFin server, and can be configured quite easily by following the following steps. 1. Enable OLP by inserting the Overload Protection Manager into the interception stack, this can be done by setting an element property under the sip-container element of the configuration. The property name is "olpInserted" and should be set to "true" as shown below. asadmin set server-config.sip-container.property.olpInserted=true server-config.sip-container.property.olpInserted = true Please note that the server has to be restarted after changing the above property for it to take effect. 2. Configure the OLP to perform memory or CPU (or both) protection shown below For CPU regulation asadmin set server-config.sip-container.property.CpuOverloadRegulation=true or For Memory regulation asadmin set server-config.sip-container.property.MemOverloadRegulation=true After steps 1 and 2 the overload protection is enabled and would use the threshold values from code defaults. 3. You can configure the threshold values too. Following are the threshold properties that can be configured and their default values IrThreshold : Default value is 70 Threshold of the cpu for initial requests (range 0-100%). A 503 response will be returned when this level is reached. E.g asadmin set server-config.sip-container.property.IrThreshold=15 MemIrThreshold : Default value is 85 Sets the threshold of the memory for initial requests (range 0-100%). A 503 response will be returned when this level is reached E.g asadmin set server-config.sip-container.property.MemIrThreshold=50 SrThreshold: Default value is 90 Sets the threshold of the cpu for subsequent requests (range 0-100%). E.g asadmin set server-config.sip-container.property.SrThreshold=90 HttpThreshold: Default value is 70 Sets the threshold of the cpu for http requests (range 0-100%) E.g asadmin set server-config.sip-container.property.HttpThreshold=60 MemHttpThreshold : Default value is 85 Sets the threshold of the memory for http requests (range 0-100%) E.g asadmin set server-config.sip-container.property.MemHttpThreshold=80 MmThreshold: Default value is 99 Sets the threshold of the cpu for max load possible for handling messages (range 0-100%), for both Http and Sip. The message, request/response will be dropped in case of SIP. asadmin set server-config.sip-container.property.MmThreshold=70 MemMmThreshold: Default value is 99 Sets the threshold of the memory for max load possible for handling messages (range 0-100%) for both Http and Sip. The message, request/response will be dropped in case of SIP. asadmin set server-config.sip-container.property.MemMmThreshold=50 4. Enhance protection algorithm by modifying the sampling parameters SampleRate: Default value is 2 Sets the sample rate of updating the overload protection levels. Must be a positive value. E.g asadmin set server-config.sip-container.property.SampleRate=5 NumberOfSamples: Default value is 5 Sets the number of consequence samples that is needed before overload is raised. The sample rate could minimum be set to 2. E.g asadmin set server-config.sip-container.property.NumberOfSamples=3 Following screenshots show the configuration and the log file when the system is overloaded ![]() Fig 1: Domain.xml with Cpu protection at 15% ![]() Fig 2. Server.log when cpu utilization is more than 15%. Fig 3: sipp load generator running invite scenario, The 900 unexpected messages are the 503 responses received when system is overloaded. Behaviour on a multi-cpu machine may be slightly different because of the way in which the CPU utilization may be calculated. »
Related Topics >>
J2EE Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|