Beispiel #1
0
def compaction_profile(title='Compaction',
                       cluster='blade_11',
                       rows=65000000,
                       threads=300):
    config = create_baseline_config(title)
    config['cluster'] = cluster
    config['operations'] = [{
        'operation':
        'stress',
        'command':
        'write n={rows} -rate threads={threads}'.format(rows=rows,
                                                        threads=threads)
    }, {
        'operation': 'nodetool',
        'command': 'flush'
    }, {
        'operation': 'nodetool',
        'command': 'compact'
    }, {
        'operation':
        'stress',
        'command':
        'read n={rows} -rate threads={threads}'.format(rows=rows,
                                                       threads=threads)
    }, {
        'operation':
        'stress',
        'command':
        'read n={rows} -rate threads={threads}'.format(rows=rows,
                                                       threads=threads)
    }]

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
Beispiel #2
0
def number_of_columns_profile(title='Read/Write {columns}',
                              cluster='blade_11',
                              rows=65000000,
                              threads=300,
                              columns=50):
    config = create_baseline_config(title.format(columns=columns))
    config['cluster'] = cluster
    config['operations'] = [{
        'operation':
        'stress',
        'command':
        'write n={rows} -rate threads={threads} -col n=FIXED\({columns}\)'.
        format(rows=rows, threads=threads, columns=columns)
    }, {
        'operation':
        'stress',
        'command':
        'read n={rows} -rate threads={threads}'.format(rows=rows,
                                                       threads=threads)
    }, {
        'operation':
        'stress',
        'command':
        'read n={rows} -rate threads={threads}'.format(rows=rows,
                                                       threads=threads)
    }]

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
Beispiel #3
0
def test_simple_profile(title='Read/Write',
                        cluster='blade_11',
                        load_rows=65000000,
                        read_rows=65000000,
                        threads=300,
                        yaml=None):
    """Test the basic stress profile with default C* settings"""
    config = create_baseline_config(title)
    config['cluster'] = cluster
    config['operations'] = [{
        'operation':
        'stress',
        'command':
        'write n={load_rows} -rate threads={threads}'.format(**locals())
    }, {
        'operation':
        'stress',
        'command':
        'read n={read_rows} -rate threads={threads}'.format(**locals())
    }, {
        'operation':
        'stress',
        'command':
        'read n={read_rows} -rate threads={threads}'.format(**locals())
    }]
    if yaml:
        config['yaml'] = yaml

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
def test_materialized_view_1_mv(title='Materialized Views (1 MV)', cluster=DEFAULT_CLUSTER_NAME,
                           rows='50M', threads=300, series='materialized_views_write_1_mv'):
    config = create_baseline_config(title, series, rolling_window_revisions())
    config['cluster'] = cluster
    config['operations'] = [
        {'operation': 'stress',
         'stress_revision': 'apache/trunk',
         'command': ('user profile=http://cassci.datastax.com/userContent/cstar_perf_regression/users-rf3-1mv.yaml '
                     'ops\(insert=1\) n={rows} -rate threads={threads}').format(rows=rows, threads=threads),
         'wait_for_compaction': False}
    ]

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
def number_of_columns_profile(title='Read/Write {columns}', cluster='blade_11', rows=65000000, threads=300, columns=50):
    config = create_baseline_config(title.format(columns=columns))
    config['cluster'] = cluster
    config['operations'] = [
        {'operation':'stress',
         'command': 'write n={rows} -rate threads={threads} -col n=FIXED\({columns}\)'.format(rows=rows, threads=threads, columns=columns)},
        {'operation':'stress',
         'command': 'read n={rows} -rate threads={threads}'.format(rows=rows, threads=threads)},
        {'operation':'stress',
         'command': 'read n={rows} -rate threads={threads}'.format(rows=rows, threads=threads)}
    ]

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
def test_simple_profile(cluster='blade_11', load_rows=65000000, read_rows=65000000, threads=300):
    """Test the basic stress profile with default C* settings""" 
    config = create_baseline_config()
    config['cluster'] = cluster
    config['operations'] = [
        {'operation':'stress',
         'command': 'write n={load_rows} -rate threads={threads}'.format(**locals())},
        {'operation':'stress',
         'command': 'read n={read_rows} -rate threads={threads}'.format(**locals())},
        {'operation':'stress',
         'command': 'read n={read_rows} -rate threads={threads}'.format(**locals())}
    ]

    
    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
def repair_profile(title='Repair', cluster='blade_11', rows=65000000, threads=300):
    config = create_baseline_config(title)
    config['cluster'] = cluster
    config['operations'] = [
        {'operation': 'stress',
         'command': 'write n={rows} -rate threads={threads}'.format(rows=rows, threads=threads)},
        {'operation': 'nodetool',
         'command': 'flush'},
        {'operation': 'nodetool',
         'command': 'repair'},
        {'operation': 'stress',
         'command': 'read n={rows} -rate threads={threads}'.format(rows=rows, threads=threads)},
        {'operation': 'stress',
         'command': 'read n={rows} -rate threads={threads}'.format(rows=rows, threads=threads)}]

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
def compaction_strategies_profile(title='Compaction Strategy', cluster=DEFAULT_CLUSTER_NAME, rows='65M',
                                  threads=300, strategy=None, series=None):
    config = create_baseline_config(title, series)
    config['cluster'] = cluster
    for r in config['revisions']:
        r['options'] = {'use_vnodes': False, 'token_allocation': 'non-vnodes'}

    schema_options = 'replication\(factor=3\)'
    if strategy:
        schema_options += ' compaction\(strategy={strategy}\)'.format(strategy=strategy)

    config['operations'] = [
        {
            'operation': 'stress',
            'stress_revision': 'apache/trunk',
            'command': 'write n={rows} cl=QUORUM -rate threads={threads} -schema {schema_options}'
                .format(rows=rows, threads=threads, schema_options=schema_options),
            'wait_for_compaction': True
        },
        {
            'operation': 'nodetool',
            'command': 'flush',
            'wait_for_compaction': True
        },
        {
            'operation': 'nodetool',
            'command': 'compact',
            'wait_for_compaction': True
        },
        {
            'operation': 'stress',
            'stress_revision': 'apache/trunk',
            'command': 'read n={rows} cl=QUORUM -rate threads={threads}'.format(rows=rows, threads=threads),
            'wait_for_compaction': True
        },
        {
            'operation': 'stress',
            'stress_revision': 'apache/trunk',
            'command': 'read n={rows} cl=QUORUM -rate threads={threads}'.format(rows=rows, threads=threads),
            'wait_for_compaction': True
        }
    ]

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
Beispiel #9
0
def compaction_strategies_profile(title='Compaction Strategy',
                                  cluster='blade_11',
                                  rows=65000000,
                                  threads=300,
                                  strategy=None):
    config = create_baseline_config(title)
    config['cluster'] = cluster

    schema_options = 'replication=\(factor=3\)'
    if strategy:
        schema_options += ' compaction\(strategy={strategy}'.format(
            strategy=strategy)

    config['operations'] = [{
        'operation':
        'stress',
        'command':
        'write n={rows} -rate threads={threads} -schema {schema_options}'.
        format(rows=rows, threads=threads, schema_options=schema_options)
    }, {
        'operation': 'nodetool',
        'command': 'flush'
    }, {
        'operation': 'nodetool',
        'command': 'compact'
    }, {
        'operation':
        'stress',
        'command':
        'read n={rows} -rate threads={threads}'.format(rows=rows,
                                                       threads=threads)
    }, {
        'operation':
        'stress',
        'command':
        'read n={rows} -rate threads={threads}'.format(rows=rows,
                                                       threads=threads)
    }]

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
def test_upgrading_versions(title='RollingUpgrade', cluster=DEFAULT_CLUSTER_NAME, series='rolling_upgrade'):
    config = create_baseline_config(title, series, rolling_upgrade_version_revisions())
    config['cluster'] = cluster
    config['num_nodes'] = "3",
    config['leave_data'] = True
    config['operations'] = [
        {
            'operation': 'nodetool',
            'command': 'version'
        },
        {
            'operation': 'nodetool',
            'command': 'upgradesstables',
            "wait_for_compaction": True
        },
        {
            'operation': 'nodetool',
            'command': 'status'
        },
        {
            'operation': 'stress',
            "command": "write n=25M -rate threads=100",
            "wait_for_compaction": True,
            'nodes': NODES
        },
        {
            'operation': 'stress',
            "command": "read n=25M -rate threads=100",
            "wait_for_compaction": True,
            'nodes': NODES
        },
        {
            'operation': 'nodetool',
            'command': 'flush',
            "wait_for_compaction": True
        },
    ]

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
def compaction_strategies_profile(title='Compaction Strategy', cluster='blade_11', rows=65000000, threads=300, strategy=None):
    config = create_baseline_config(title)
    config['cluster'] = cluster

    schema_options = 'replication=\(factor=3\)'
    if strategy:
        schema_options += ' compaction\(strategy={strategy}'.format(strategy=strategy)

    config['operations'] = [
        {'operation': 'stress',
         'command': 'write n={rows} -rate threads={threads} -schema {schema_options}'.format(rows=rows, threads=threads,
                                                                                             schema_options=schema_options)},
        {'operation': 'nodetool',
         'command': 'flush'},
        {'operation': 'nodetool',
         'command': 'compact'},
        {'operation': 'stress',
         'command': 'read n={rows} -rate threads={threads}'.format(rows=rows, threads=threads)},
        {'operation': 'stress',
         'command': 'read n={rows} -rate threads={threads}'.format(rows=rows, threads=threads)}]

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
def repair_profile(title='Repair', cluster=DEFAULT_CLUSTER_NAME, rows='65M', threads=300, series=None):
    config = create_baseline_config(title, series)
    config['cluster'] = cluster
    config['operations'] = [
        {'operation': 'stress',
         'stress_revision': 'apache/trunk',
         'command': 'write n={rows} -rate threads={threads}'.format(rows=rows, threads=threads),
         'wait_for_compaction': True},
        {'operation': 'nodetool',
         'command': 'flush'},
        {'operation': 'nodetool',
         'command': 'repair'},
        {'operation': 'stress',
         'stress_revision': 'apache/trunk',
         'command': 'read n={rows} -rate threads={threads}'.format(rows=rows, threads=threads),
         'wait_for_compaction': True},
        {'operation': 'stress',
         'stress_revision': 'apache/trunk',
         'command': 'read n={rows} -rate threads={threads}'.format(rows=rows, threads=threads),
         'wait_for_compaction': True}
    ]

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)
def test_simple_profile(title='Read/Write', cluster=DEFAULT_CLUSTER_NAME, load_rows='65M', read_rows='65M',
                        threads=300, yaml=None, series='read_write'):
    """Test the basic stress profile with default C* settings"""
    config = create_baseline_config(title, series)
    config['cluster'] = cluster
    config['operations'] = [
        {'operation': 'stress',
         'stress_revision': 'apache/trunk',
         'command': 'write n={load_rows} -rate threads={threads}'.format(**locals()),
         'wait_for_compaction': True},
        {'operation': 'stress',
         'stress_revision': 'apache/trunk',
         'command': 'read n={read_rows} -rate threads={threads}'.format(**locals()),
         'wait_for_compaction': True},
        {'operation': 'stress',
         'stress_revision': 'apache/trunk',
         'command': 'read n={read_rows} -rate threads={threads}'.format(**locals()),
         'wait_for_compaction': True}
    ]
    if yaml:
        config['yaml'] = yaml

    scheduler = Scheduler(CSTAR_SERVER)
    scheduler.schedule(config)