public class StressTestConcurrentTx extends ProxyTestCase<Journal> implements com.bigdata.testutil.ExperimentDriver.IComparisonTest
Note: For short transactions, TPS is basically constant for a given
combination of the buffer mode and whether or not commits are forced to disk.
This means that the #of clients is not a strong influence on performance. The
big wins are Transient and Force := No since neither conditions syncs to
disk. This suggests that the big win for TPS throughput is going to be group
commit followed by either the use of SDD for the journal or pipelining writes
to secondary journals on failover hosts.
FIXME Finish support for transactions in AbstractTask
.
Modifier and Type | Class and Description |
---|---|
static class |
StressTestConcurrentTx.GenerateExperiment
Experiment generation utility class.
|
static class |
StressTestConcurrentTx.Task
Run a transaction.
|
static interface |
StressTestConcurrentTx.TestOptions
Additional properties understood by this test.
|
TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
StressTestConcurrentTx() |
StressTestConcurrentTx(String name) |
Modifier and Type | Method and Description |
---|---|
com.bigdata.testutil.ExperimentDriver.Result |
doComparisonTest(Properties properties)
Setup and run a test.
|
static com.bigdata.testutil.ExperimentDriver.Result |
doConcurrentClientTest(Journal journal,
long timeout,
int nclients,
int ntrials,
int keyLen,
int nops,
double abortRate)
A stress test with a pool of concurrent clients.
|
static void |
main(String[] args)
Runs a single instance of the test as configured in the code.
|
void |
setUpComparisonTest(Properties properties) |
void |
tearDownComparisonTest() |
void |
test_concurrentClients()
A stress test with a small pool of concurrent clients.
|
getDelegate, getOurDelegate, getProperties, getStore, getStore, reopenStore, setDelegate, setUp, tearDown
checkIfProxy, fail, getRandomData, setUp, tearDown
assertCondition, assertCondition, assertEquals, assertEquals, getBytes, getPort, getRandomData, getRandomData
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
public StressTestConcurrentTx()
public StressTestConcurrentTx(String name)
public void setUpComparisonTest(Properties properties) throws Exception
setUpComparisonTest
in interface com.bigdata.testutil.ExperimentDriver.IComparisonTest
Exception
public void tearDownComparisonTest() throws Exception
tearDownComparisonTest
in interface com.bigdata.testutil.ExperimentDriver.IComparisonTest
Exception
public void test_concurrentClients() throws InterruptedException
InterruptedException
public static com.bigdata.testutil.ExperimentDriver.Result doConcurrentClientTest(Journal journal, long timeout, int nclients, int ntrials, int keyLen, int nops, double abortRate) throws InterruptedException
Note: nclients corresponds to a number of external processes that
start transactions, submit AbstractTask
s that operate against
those transactions, and finally choose to either commit or abort the
transactions. The concurrency with which the AbstractTask
s
submitted by the "clients" may run is governed by the
ConcurrencyManager.Options
. However, the concurrency is capped by
the #of clients since each client manages a single transaction at a time.
journal
- The database.resource
- The name of the index on which the transactions will
operation.timeout
- The #of seconds before the test will terminate.nclients
- The #of concurrent clients.ntrials
- The #of transactions to execute.keyLen
- The length of the random unsigned byte[] keys used in the
operations. The longer the keys the less likely it is that
there will be a write-write conflict (that concurrent txs will
write on the same key).nops
- The #of operations to be performed in each transaction.abortRate
- The #of clients that choose to abort a transaction rather the
committing it [0.0:1.0]. Note that the abort point is always
choosen after the client has submitting at least one write
task for the transaction.InterruptedException
public static void main(String[] args) throws Exception
Exception
ExperimentDriver, which parameterizes the use of this stress test.
That information should be used to limit the #of transactions
allowed to start at one time on the server and should guide a search
for thinning down resource consumption, e.g., memory usage by
btrees, the node serializer, etc.
,
GenerateExperiment, which may be used to generate a set of
conditions to be run by the {@link ExperimentDriver}.
public com.bigdata.testutil.ExperimentDriver.Result doComparisonTest(Properties properties) throws Exception
doComparisonTest
in interface com.bigdata.testutil.ExperimentDriver.IComparisonTest
properties
- There are no "optional" properties - you must make sure that
each property has a defined value.Exception
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.