from common import * import config import recovery import subprocess dat = open('%s/recovery/objectsize_scale.data' % top_path, 'w', 1) numBackups = len(config.hosts) for objectSize in [128, 256, 1024]: print('# objectSize:', objectSize, file=dat) print('# Data sourced by %d backups' % objectSize, file=dat) for partitionSize in range(1, 1050, 100): args = {} args['num_servers'] = numBackups args['backups_per_server'] = 1 args['num_partitions'] = 1 args['object_size'] = objectSize args['replicas'] = 3 args['master_ram'] = 8000 numObjectsPerMb = 2**20 / (objectSize + 38) args['num_objects'] = int(numObjectsPerMb * partitionSize) print('Running with %d backups' % numBackups) print('Running with objects of size %d for a %d MB partition' % (objectSize, partitionSize)) r = recovery.insist(**args) print('->', r['ns'] / 1e6, 'ms', '(run %s)' % r['run']) print(partitionSize, r['ns'] / 1e6, file=dat) print(file=dat) print(file=dat)
import recovery import subprocess dat = open('%s/recovery/backup_scale.data' % top_path, 'w', 1) for numBackups in range(3, len(config.hosts)): print('Running recovery with %d backup(s)' % numBackups) args = {} args['num_servers'] = numBackups args['backups_per_server'] = 1 args['num_partitions'] = 1 args['object_size'] = 1024 args['num_objects'] = 592415 # 600MB args['master_ram'] = 8000 args['replicas'] = 3 r = recovery.insist(**args) print('->', r['ns'] / 1e6, 'ms', '(run %s)' % r['run']) masterCpuMs = metrics.average( [(master.master.recoveryTicks / master.clockFrequency) for master in r['metrics'].masters]) * 1e3 diskBandwidth = sum([(backup.backup.storageReadBytes + backup.backup.storageWriteBytes) / 2**20 for backup in r['metrics'].backups]) * 1e9 / r['ns'] diskActiveMsPoints = [backup.backup.storageReadTicks * 1e3 / backup.clockFrequency for backup in r['metrics'].backups] print(numBackups, r['ns'] / 1e6, masterCpuMs, diskBandwidth, metrics.average(diskActiveMsPoints),