Support no-limit rate in progressions
Change-Id: I158f4132e9e4833b103511c3bc029b903dc10d93
This commit is contained in:
parent
c7fae16a89
commit
816942975c
|
@ -168,6 +168,8 @@ class StorageCleaner(AbstractCleaner):
|
|||
except NotFound:
|
||||
print 'WARNING: Volume %s attached to an instance that no longer '\
|
||||
'exists (will require manual cleanup of the database)' % (id)
|
||||
except Exception as e:
|
||||
print str(e)
|
||||
else:
|
||||
# no attachments
|
||||
kb_volumes.append(vol)
|
||||
|
|
|
@ -145,6 +145,15 @@ class KBConfig(object):
|
|||
self.config_scale['server'] = self.server_cfg
|
||||
self.config_scale['client'] = self.client_cfg
|
||||
|
||||
# missing rate or rate_iops = 0 = no-limit
|
||||
# note we need to use key based access to modify the content
|
||||
# (self.config_scale['client'].storage_tool_configs will make a shallow copy)
|
||||
for tc in self.config_scale['client']['storage_tool_configs']:
|
||||
if 'rate' not in tc:
|
||||
tc['rate'] = '0'
|
||||
if 'rate_iops' not in tc:
|
||||
tc['rate_iops'] = 0
|
||||
|
||||
def init_with_cli(self):
|
||||
self.storage_mode = CONF.storage
|
||||
self.multicast_mode = CONF.multicast
|
||||
|
|
|
@ -71,8 +71,8 @@ class KBRunner_Storage(KBRunner):
|
|||
return msg
|
||||
|
||||
def init_volume(self, active_range):
|
||||
# timeout is calculated as 30s/GB
|
||||
timeout = 30 * self.config.storage_stage_configs.io_file_size
|
||||
# timeout is calculated as 30s/GB/client VM
|
||||
timeout = 30 * self.config.storage_stage_configs.io_file_size * len(self.client_dict)
|
||||
parameter = {'size': str(self.config.storage_stage_configs.io_file_size) + 'GiB'}
|
||||
parameter['mkfs'] = True \
|
||||
if self.config.storage_stage_configs.target == 'volume' else False
|
||||
|
@ -205,14 +205,18 @@ class KBRunner_Storage(KBRunner):
|
|||
cur_iops = int(self.tool_result[idx]['write_iops'])
|
||||
cur_rate = int(self.tool_result[idx]['write_bw'])
|
||||
|
||||
degrade_iops = (req_iops - cur_iops) * 100 / req_iops if req_iops else 0
|
||||
degrade_rate = (req_rate - cur_rate) * 100 / req_rate if req_rate else 0
|
||||
if ((cur_tc['mode'] in ['randread', 'randwrite'] and degrade_iops > limit)
|
||||
or (cur_tc['mode'] in ['read', 'write'] and degrade_rate > limit)):
|
||||
LOG.warning('KloudBuster is stopping the iteration because the result '
|
||||
'reaches the stop limit.')
|
||||
tc_flag = False
|
||||
break
|
||||
# some runs define an unlimited iops/bw in this case
|
||||
# we never abort the iteration
|
||||
if req_iops or req_rate:
|
||||
degrade_iops = (req_iops - cur_iops) * 100 / req_iops if req_iops else 0
|
||||
degrade_rate = (req_rate - cur_rate) * 100 / req_rate if req_rate else 0
|
||||
if ((cur_tc['mode'] in ['randread', 'randwrite'] and
|
||||
degrade_iops > limit)
|
||||
or (cur_tc['mode'] in ['read', 'write'] and degrade_rate > limit)):
|
||||
LOG.warning('KloudBuster is stopping the iteration '
|
||||
'because the result reaches the stop limit.')
|
||||
tc_flag = False
|
||||
break
|
||||
if timeout_vms:
|
||||
LOG.warning('KloudBuster is stopping the iteration because of there are %d '
|
||||
'VMs timing out' % timeout_vms)
|
||||
|
|
Loading…
Reference in New Issue