mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-10 00:58:17 +03:00
F #2192: New MONITOR INTERVALS for fine grain tunning
This commit is contained in:
parent
8445206ab6
commit
d0766591f0
@ -67,8 +67,6 @@ private:
|
||||
static VirtualMachinePool * vmpool;
|
||||
|
||||
static MonitorThreadPool * mthpool;
|
||||
|
||||
static time_t monitor_interval;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -6,9 +6,12 @@
|
||||
# Daemon configuration attributes
|
||||
#-------------------------------------------------------------------------------
|
||||
# MANAGER_TIMER: Time in seconds the core uses to evaluate periodical functions.
|
||||
# MONITORING_INTERVAL cannot have a smaller value than MANAGER_TIMER.
|
||||
# MONITORING_INTERVALS cannot have a smaller value than MANAGER_TIMER.
|
||||
#
|
||||
# MONITORING_INTERVAL: Time in seconds between host and VM monitorization.
|
||||
# MONITORING_INTERVAL_HOST: Time in seconds between host monitorization.
|
||||
# MONITORING_INTERVAL_VM: Time in seconds between VM monitorization.
|
||||
# MONITORING_INTERVAL_MARKET: Time in seconds between market monitorization.
|
||||
# MONITORING_INTERVAL_DATASTORE: Time in seconds between image monitorization.
|
||||
#
|
||||
# MONITORING_THREADS: Max. number of threads used to process monitor messages
|
||||
#
|
||||
@ -64,7 +67,11 @@ LOG = [
|
||||
|
||||
#MANAGER_TIMER = 15
|
||||
|
||||
MONITORING_INTERVAL = 60
|
||||
MONITORING_INTERVAL_HOST = 180
|
||||
MONITORING_INTERVAL_VM = 180
|
||||
MONITORING_INTERVAL_DATASTORE = 300
|
||||
MONITORING_INTERVAL_MARKET = 600
|
||||
|
||||
MONITORING_THREADS = 50
|
||||
|
||||
#HOST_PER_INTERVAL = 15
|
||||
@ -354,14 +361,14 @@ DEFAULT_IMAGE_TYPE = "OS"
|
||||
# -f Interval in seconds to flush collected information (default 5)
|
||||
# -t Number of threads for the server (default 50)
|
||||
# -i Time in seconds of the monitorization push cycle. This parameter must
|
||||
# be smaller than MONITORING_INTERVAL, otherwise push monitorization will
|
||||
# be smaller than MONITORING_INTERVAL_HOST, otherwise push monitorization will
|
||||
# not be effective.
|
||||
# -w Timeout in seconds to execute external commands (default unlimited)
|
||||
#-------------------------------------------------------------------------------
|
||||
IM_MAD = [
|
||||
NAME = "collectd",
|
||||
EXECUTABLE = "collectd",
|
||||
ARGUMENTS = "-p 4124 -f 5 -t 50 -i 20" ]
|
||||
ARGUMENTS = "-p 4124 -f 5 -t 50 -i 60" ]
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -153,9 +153,9 @@ sys = OpenNebula::System.new(client)
|
||||
conf = sys.get_configuration
|
||||
|
||||
begin
|
||||
MONITORING_INTERVAL = conf['MONITORING_INTERVAL'] || 60
|
||||
MONITORING_INTERVAL = conf['MONITORING_INTERVAL_HOST'] || 60
|
||||
rescue Exception => e
|
||||
log_error "Could not get MONITORING_INTERVAL"
|
||||
log_error "Could not get MONITORING_INTERVAL_HOST"
|
||||
log_error e.to_s
|
||||
exit_error
|
||||
end
|
||||
|
@ -42,8 +42,6 @@ ClusterPool * MonitorThread::cpool;
|
||||
|
||||
VirtualMachinePool * MonitorThread::vmpool;
|
||||
|
||||
time_t MonitorThread::monitor_interval;
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
@ -320,9 +318,6 @@ MonitorThreadPool::MonitorThreadPool(int max_thr):concurrent_threads(max_thr),
|
||||
|
||||
MonitorThread::vmpool = Nebula::instance().get_vmpool();
|
||||
|
||||
Nebula::instance().get_configuration_attribute("MONITORING_INTERVAL",
|
||||
MonitorThread::monitor_interval);
|
||||
|
||||
MonitorThread::mthpool= this;
|
||||
|
||||
//Initialize concurrency variables
|
||||
|
@ -480,10 +480,16 @@ void Nebula::start(bool bootstrap_only)
|
||||
MadManager::mad_manager_system_init();
|
||||
|
||||
time_t timer_period;
|
||||
time_t monitor_period;
|
||||
time_t monitor_interval_host;
|
||||
time_t monitor_interval_datastore;
|
||||
time_t monitor_interval_market;
|
||||
time_t monitor_interval_vm;
|
||||
|
||||
nebula_configuration->get("MANAGER_TIMER", timer_period);
|
||||
nebula_configuration->get("MONITORING_INTERVAL", monitor_period);
|
||||
nebula_configuration->get("MONITORING_INTERVAL_HOST", monitor_interval_host);
|
||||
nebula_configuration->get("MONITORING_INTERVAL_DATASTORE", monitor_interval_datastore);
|
||||
nebula_configuration->get("MONITORING_INTERVAL_MARKET", monitor_interval_market);
|
||||
nebula_configuration->get("MONITORING_INTERVAL_VM", monitor_interval_vm);
|
||||
|
||||
// ---- ACL Manager ----
|
||||
try
|
||||
@ -771,7 +777,6 @@ void Nebula::start(bool bootstrap_only)
|
||||
int vm_limit;
|
||||
|
||||
bool do_poll;
|
||||
time_t poll_period = 0;
|
||||
|
||||
nebula_configuration->get("VM_PER_INTERVAL", vm_limit);
|
||||
|
||||
@ -779,11 +784,9 @@ void Nebula::start(bool bootstrap_only)
|
||||
|
||||
nebula_configuration->get("VM_INDIVIDUAL_MONITORING", do_poll);
|
||||
|
||||
poll_period = monitor_period * 2.5;
|
||||
|
||||
vmm = new VirtualMachineManager(
|
||||
timer_period,
|
||||
poll_period,
|
||||
monitor_interval_vm,
|
||||
do_poll,
|
||||
vm_limit,
|
||||
vmm_mads);
|
||||
@ -834,7 +837,7 @@ void Nebula::start(bool bootstrap_only)
|
||||
im = new InformationManager(hpool,
|
||||
clpool,
|
||||
timer_period,
|
||||
monitor_period,
|
||||
monitor_interval_host,
|
||||
host_limit,
|
||||
monitor_threads,
|
||||
remotes_location,
|
||||
@ -929,7 +932,7 @@ void Nebula::start(bool bootstrap_only)
|
||||
nebula_configuration->get("DATASTORE_MAD", image_mads);
|
||||
|
||||
imagem = new ImageManager(timer_period,
|
||||
monitor_period,
|
||||
monitor_interval_datastore,
|
||||
ipool,
|
||||
dspool,
|
||||
image_mads);
|
||||
@ -953,7 +956,7 @@ void Nebula::start(bool bootstrap_only)
|
||||
|
||||
nebula_configuration->get("MARKET_MAD", mmads);
|
||||
|
||||
marketm = new MarketPlaceManager(timer_period, monitor_period, mmads);
|
||||
marketm = new MarketPlaceManager(timer_period, monitor_interval_market, mmads);
|
||||
}
|
||||
catch (bad_alloc&)
|
||||
{
|
||||
|
@ -368,7 +368,10 @@ void OpenNebulaTemplate::set_conf_default()
|
||||
# Daemon configuration attributes
|
||||
#-------------------------------------------------------------------------------
|
||||
# MANAGER_TIMER
|
||||
# MONITORING_INTERVAL
|
||||
# MONITORING_INTERVAL_HOST
|
||||
# MONITORING_INTERVAL_VM
|
||||
# MONITORING_INTERVAL_MARKET
|
||||
# MONITORING_INTERVAL_DATASTORE
|
||||
# MONITORING_THREADS
|
||||
# HOST_PER_INTERVAL
|
||||
# HOST_MONITORING_EXPIRATION_TIME
|
||||
@ -384,7 +387,10 @@ void OpenNebulaTemplate::set_conf_default()
|
||||
#*******************************************************************************
|
||||
*/
|
||||
set_conf_single("MANAGER_TIMER", "15");
|
||||
set_conf_single("MONITORING_INTERVAL", "60");
|
||||
set_conf_single("MONITORING_INTERVAL_HOST", "180");
|
||||
set_conf_single("MONITORING_INTERVAL_VM", "180");
|
||||
set_conf_single("MONITORING_INTERVAL_MARKET", "600");
|
||||
set_conf_single("MONITORING_INTERVAL_DATASTORE", "300");
|
||||
set_conf_single("MONITORING_THREADS", "50");
|
||||
set_conf_single("HOST_PER_INTERVAL", "15");
|
||||
set_conf_single("HOST_MONITORING_EXPIRATION_TIME", "43200");
|
||||
|
Loading…
x
Reference in New Issue
Block a user