Exemplo n.º 1
0
def storage_perf_burn(hw_, allow_destructive, running_time=10):
    mode = "non destructive"
    if allow_destructive:
        mode = 'destructive'
        running_time = running_time / 2
    disks = get_disks_name(hw_)
    sys.stderr.write('Running storage burn on %d disks in'
                     ' %s mode for %d seconds\n' % (
                         len(disks), mode, 2 * running_time))
    if allow_destructive:
        HL.run_fio(hw_, get_disks_name(hw_, True), "write", "1M", running_time, RAMP_TIME)
        HL.run_fio(hw_, get_disks_name(hw_, True), "randwrite", "4k", running_time, RAMP_TIME)

    HL.run_fio(hw_, disks, "read", "1M", running_time, RAMP_TIME)
    HL.run_fio(hw_, disks, "randread", "4k", running_time, RAMP_TIME)
Exemplo n.º 2
0
def storage_perf_burn(hw_, allow_destructive, running_time=10):
    mode = "non destructive"
    if allow_destructive:
        mode = 'destructive'
        running_time = running_time / 2
    disks = get_disks_name(hw_)
    sys.stderr.write('Running storage burn on %d disks in'
                     ' %s mode for %d seconds\n' % (
                         len(disks), mode, 2 * running_time))
    if allow_destructive:
        HL.run_fio(hw_, get_disks_name(hw_, True), "write", "1M", running_time, RAMP_TIME)
        HL.run_fio(hw_, get_disks_name(hw_, True), "randwrite", "4k", running_time, RAMP_TIME)

    HL.run_fio(hw_, disks, "read", "1M", running_time, RAMP_TIME)
    HL.run_fio(hw_, disks, "randread", "4k", running_time, RAMP_TIME)
Exemplo n.º 3
0
def storage_perf(hw_, allow_destructive, running_time=10):
    'Reporting disk performance'
    mode = "non destructive"
    # Let's count the number of runs in safe mode
    total_runtime = len(get_disks_name(hw_)) * (running_time + RAMP_TIME) * 2
    disks = get_disks_name(hw_)
    if (len(disks) > 1):
        total_runtime += 2 * (running_time + RAMP_TIME)

    if allow_destructive:
        total_runtime = total_runtime * 2
        mode = 'destructive'

    sys.stderr.write('Running storage bench on %d disks in'
                     ' %s mode for %d seconds\n' %
                     (len(disks), mode, total_runtime))
    for disk in disks:
        is_booted_storage_device(disk)
        if allow_destructive:
            if is_booted_storage_device(disk):
                sys.stderr.write("Skipping disk %s in destructive mode,"
                                 " this is the booted device !" % disk)
            else:
                HL.run_fio(hw_, ['%s' % disk], "write", "1M", running_time,
                           RAMP_TIME)
                HL.run_fio(hw_, ['%s' % disk], "randwrite", "4k", running_time,
                           RAMP_TIME)

        HL.run_fio(hw_, ['%s' % disk], "read", "1M", running_time, RAMP_TIME)
        HL.run_fio(hw_, ['%s' % disk], "randread", "4k", running_time,
                   RAMP_TIME)

    if (len(disks) > 1):
        if allow_destructive:
            HL.run_fio(hw_, get_disks_name(hw_, True), "write", "1M",
                       running_time, RAMP_TIME)
            HL.run_fio(hw_, get_disks_name(hw_, True), "randwrite", "4k",
                       running_time, RAMP_TIME)
        HL.run_fio(hw_, disks, "read", "1M", running_time, RAMP_TIME)
        HL.run_fio(hw_, disks, "randread", "4k", running_time, RAMP_TIME)
Exemplo n.º 4
0
def storage_perf(hw_, allow_destructive, running_time=10):
    'Reporting disk performance'
    mode = "non destructive"
    # Let's count the number of runs in safe mode
    total_runtime = len(get_disks_name(hw_)) * (running_time + RAMP_TIME) * 2
    disks = get_disks_name(hw_)
    if (len(disks) > 1):
        total_runtime += 2 * (running_time + RAMP_TIME)

    if allow_destructive:
        total_runtime = total_runtime * 2
        mode = 'destructive'

    sys.stderr.write('Running storage bench on %d disks in'
                     ' %s mode for %d seconds\n' % (
                         len(disks), mode, total_runtime))
    for disk in disks:
        is_booted_storage_device(disk)
        if allow_destructive:
            if is_booted_storage_device(disk):
                sys.stderr.write("Skipping disk %s in destructive mode,"
                                 " this is the booted device !" % disk)
            else:
                HL.run_fio(hw_, ['%s' % disk], "write", "1M", running_time, RAMP_TIME)
                HL.run_fio(hw_, ['%s' % disk], "randwrite", "4k", running_time, RAMP_TIME)

        HL.run_fio(hw_, ['%s' % disk], "read", "1M", running_time, RAMP_TIME)
        HL.run_fio(hw_, ['%s' % disk], "randread", "4k", running_time, RAMP_TIME)

    if (len(disks) > 1):
        if allow_destructive:
            HL.run_fio(hw_, get_disks_name(hw_, True), "write", "1M",
                       running_time, RAMP_TIME)
            HL.run_fio(hw_, get_disks_name(hw_, True), "randwrite", "4k",
                       running_time, RAMP_TIME)
        HL.run_fio(hw_, disks, "read", "1M", running_time, RAMP_TIME)
        HL.run_fio(hw_, disks, "randread", "4k", running_time, RAMP_TIME)