Permalink
Browse files

fixes to the workload, Add Wikipedia plugin

git-svn-id: https://oltpbenchmark.googlecode.com/svn/trunk@9 8c9255d6-0b70-036a-fcb6-8a999947b34c
  • Loading branch information...
dedcode committed Aug 20, 2011
1 parent 32ccecf commit ef3cbe7a98c961bf4502db574ca7f43e72656cea
Showing with 449 additions and 73 deletions.
  1. +18 −0 .classpath
  2. +17 −0 .project
  3. +12 −0 .settings/org.eclipse.jdt.core.prefs
  4. BIN bin/com/oltpbenchmark/DBWorkload.class
  5. BIN bin/com/oltpbenchmark/DistributionStatistics.class
  6. BIN bin/com/oltpbenchmark/IBenchmarkModule.class
  7. BIN bin/com/oltpbenchmark/IncrementBench$IncrementWorker.class
  8. BIN bin/com/oltpbenchmark/IncrementBench.class
  9. BIN bin/com/oltpbenchmark/LatencyRecord$LatencyRecordIterator.class
  10. BIN bin/com/oltpbenchmark/LatencyRecord$Sample.class
  11. BIN bin/com/oltpbenchmark/LatencyRecord.class
  12. BIN bin/com/oltpbenchmark/LoadLineReader.class
  13. BIN bin/com/oltpbenchmark/QueueLimitException.class
  14. BIN bin/com/oltpbenchmark/ThreadBench$BenchmarkState.class
  15. BIN bin/com/oltpbenchmark/ThreadBench$Results.class
  16. BIN bin/com/oltpbenchmark/ThreadBench$State.class
  17. BIN bin/com/oltpbenchmark/ThreadBench$TimeBucketIterable.class
  18. BIN bin/com/oltpbenchmark/ThreadBench$TimeBucketIterator.class
  19. BIN bin/com/oltpbenchmark/ThreadBench$Worker.class
  20. BIN bin/com/oltpbenchmark/ThreadBench.class
  21. BIN bin/com/oltpbenchmark/ThreadBenchExample$RandomSleepWorker.class
  22. BIN bin/com/oltpbenchmark/ThreadBenchExample.class
  23. BIN bin/com/oltpbenchmark/WorkLoadConfiguration$Phase.class
  24. BIN bin/com/oltpbenchmark/WorkLoadConfiguration.class
  25. BIN bin/com/oltpbenchmark/tpcc/DiskStresser.class
  26. BIN bin/com/oltpbenchmark/tpcc/DiskStresserRateLimited$DiskStresserWorker.class
  27. BIN bin/com/oltpbenchmark/tpcc/DiskStresserRateLimited.class
  28. BIN bin/com/oltpbenchmark/tpcc/HSQLDBLoadData.class
  29. BIN bin/com/oltpbenchmark/tpcc/JOutputArea.class
  30. BIN bin/com/oltpbenchmark/tpcc/LoadData$FastPreparedStatement.class
  31. BIN bin/com/oltpbenchmark/tpcc/LoadData$FastPreparedStatementConn.class
  32. BIN bin/com/oltpbenchmark/tpcc/LoadData$NotImplementedException.class
  33. BIN bin/com/oltpbenchmark/tpcc/LoadData.class
  34. BIN bin/com/oltpbenchmark/tpcc/MeasureTargetSystem.class
  35. BIN bin/com/oltpbenchmark/tpcc/MysqlGetStats.class
  36. BIN bin/com/oltpbenchmark/tpcc/PlayTraceFromFile$DiskStresserWorker.class
  37. BIN bin/com/oltpbenchmark/tpcc/PlayTraceFromFile.class
  38. +76 −0 bin/com/oltpbenchmark/tpcc/README
  39. BIN bin/com/oltpbenchmark/tpcc/SSHGetStats.class
  40. BIN bin/com/oltpbenchmark/tpcc/SimplePrinter.class
  41. BIN bin/com/oltpbenchmark/tpcc/SimpleSystemPrinter.class
  42. BIN bin/com/oltpbenchmark/tpcc/StatisticsCollector.class
  43. BIN bin/com/oltpbenchmark/tpcc/StatsHolder.class
  44. BIN bin/com/oltpbenchmark/tpcc/TPCCBenchmark$TPCCWorker.class
  45. BIN bin/com/oltpbenchmark/tpcc/TPCCBenchmark.class
  46. BIN bin/com/oltpbenchmark/tpcc/TPCCOverTime.class
  47. BIN bin/com/oltpbenchmark/tpcc/TPCCRateLimited$TPCCWorker.class
  48. BIN bin/com/oltpbenchmark/tpcc/TPCCRateLimited.class
  49. BIN bin/com/oltpbenchmark/tpcc/TPCCRateLimitedFromFile.class
  50. BIN bin/com/oltpbenchmark/tpcc/TestTimeAPI.class
  51. BIN bin/com/oltpbenchmark/tpcc/jTPCC.class
  52. BIN bin/com/oltpbenchmark/tpcc/jTPCCAutomaticScaling$1.class
  53. BIN bin/com/oltpbenchmark/tpcc/jTPCCAutomaticScaling.class
  54. BIN bin/com/oltpbenchmark/tpcc/jTPCCConfig$TransactionType.class
  55. BIN bin/com/oltpbenchmark/tpcc/jTPCCConfig.class
  56. BIN bin/com/oltpbenchmark/tpcc/jTPCCDriver.class
  57. BIN bin/com/oltpbenchmark/tpcc/jTPCCHeadless$1.class
  58. BIN bin/com/oltpbenchmark/tpcc/jTPCCHeadless.class
  59. BIN bin/com/oltpbenchmark/tpcc/jTPCCTerminal$UserAbortException.class
  60. BIN bin/com/oltpbenchmark/tpcc/jTPCCTerminal.class
  61. BIN bin/com/oltpbenchmark/tpcc/jTPCCUtil.class
  62. BIN bin/com/oltpbenchmark/tpcc/jdbc/ExecJDBC.class
  63. BIN bin/com/oltpbenchmark/tpcc/jdbc/HSQLDBjdbcIO.class
  64. BIN bin/com/oltpbenchmark/tpcc/jdbc/jdbcIO.class
  65. BIN bin/com/oltpbenchmark/tpcc/pojo/Customer.class
  66. BIN bin/com/oltpbenchmark/tpcc/pojo/District.class
  67. BIN bin/com/oltpbenchmark/tpcc/pojo/History.class
  68. BIN bin/com/oltpbenchmark/tpcc/pojo/Item.class
  69. BIN bin/com/oltpbenchmark/tpcc/pojo/NewOrder.class
  70. BIN bin/com/oltpbenchmark/tpcc/pojo/Oorder.class
  71. BIN bin/com/oltpbenchmark/tpcc/pojo/OrderLine.class
  72. BIN bin/com/oltpbenchmark/tpcc/pojo/Stock.class
  73. BIN bin/com/oltpbenchmark/tpcc/pojo/Warehouse.class
  74. BIN bin/com/oltpbenchmark/wikipedia/Article.class
  75. BIN bin/com/oltpbenchmark/wikipedia/TraceTransactionGenerator.class
  76. BIN bin/com/oltpbenchmark/wikipedia/Transaction.class
  77. BIN bin/com/oltpbenchmark/wikipedia/TransactionGenerator.class
  78. BIN bin/com/oltpbenchmark/wikipedia/TransactionSelector.class
  79. BIN bin/com/oltpbenchmark/wikipedia/WikipediaBenchmark.class
  80. BIN bin/com/oltpbenchmark/wikipedia/WikipediaWorker.class
  81. +44 −0 bin/com/oltpbenchmark/wikipedia/sampledata_fromlargerdb.sh
  82. +118 −0 bin/com/oltpbenchmark/wikipedia/workload_rewriting_for_live_migration.txt
  83. +3 −0 bin/manifest.mf
  84. +5 −0 config/plugin.xml
  85. +27 −0 config/sample_tpcc_config.xml
  86. +28 −0 config/sample_wiki_config.xml
  87. BIN lib/commons-jxpath-1.3.jar
  88. +23 −0 reports/BenchmarkSQL_session_20110820041342.txt
  89. +21 −3 src/com/oltpbenchmark/DBWorkload.java
  90. +4 −11 src/com/oltpbenchmark/ThreadBench.java
  91. +30 −0 src/com/oltpbenchmark/WorkLoadConfiguration.java
  92. +23 −59 src/com/oltpbenchmark/wikipedia/WikipediaBenchmark.java
View
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="lib" path="lib/commons-cli-1.2.jar"/>
+ <classpathentry kind="lib" path="lib/commons-configuration-1.6.jar"/>
+ <classpathentry kind="lib" path="lib/commons-logging-1.1.1.jar"/>
+ <classpathentry kind="lib" path="lib/commons-collections-3.2.1.jar"/>
+ <classpathentry kind="lib" path="lib/commons-lang-2.6.jar"/>
+ <classpathentry kind="lib" path="lib/mysql-connector-java-5.1.10-bin.jar"/>
+ <classpathentry kind="lib" path="lib/postgresql-8.0.309.jdbc3.jar"/>
+ <classpathentry kind="lib" path="lib/ojdbc14-10.2.jar"/>
+ <classpathentry kind="lib" path="lib/hsqldb.jar"/>
+ <classpathentry kind="lib" path="lib/ganymed-ssh2-build250.jar"/>
+ <classpathentry kind="lib" path="lib/edb-jdbc14-8_0_3_14.jar"/>
+ <classpathentry kind="lib" path="lib/commons-jxpath-1.3.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>oltp</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,12 @@
+#Sat Aug 20 04:03:40 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,76 @@
+
+
+This contains a JDBC implementation of TPC-C. It was based on
+http://jtpcc.sourceforge.net/
+
+However, we fixed a number of bugs, and we believe our benchmark framework
+is "better." Here are some incomplete directions for running experiments:
+
+
+Overview:
+* Start a clean TPC-C database
+* "Warm" the buffer pool by running some queries
+* Run the experiment for 60 minutes.
+* At the 20 minute mark, trigger the migration.
+* It would be good to know how long the migration actually took to complete.
+
+Ideally, we will look at the throughput and latency numbers over time, and we will see something interesting. Directions for the direct experiments talking with MySQL. We will eventually want to repeat these experiments talking to MySQL through our system, but I'm currently making changes there, so we'll need to do this later.
+
+
+1. Grab the latest version of MySQL. You can get it from:
+
+scp -r vise:~evanj/mysql-5.5.7-rc-linux2.6-x86_64 .
+
+
+2. Grab a 32 warehouse database:
+
+scp -r vise:~evanj/tpcc_mysql-32orig .
+
+
+3. Copy it to a new directory:
+
+cp -ar tpcc_mysql-32orig tpcc_mysql
+
+
+4. Start mysql in one terminal in screen. I've been using the following script:
+
+#!/bin/sh
+DATADIR=/home/evanj/tpcc_mysql
+BASEDIR=/home/evanj/mysql-5.5.7-rc-linux2.6-x86_64
+
+OPTIONS="--innodb-buffer-pool-size=8G
+ --innodb_log_file_size=256M
+ --innodb_flush_method=O_DIRECT
+ --port=3310
+ --transaction_isolation=serializable
+ --max_connections=300"
+
+$BASEDIR/bin/mysqld --no-defaults --basedir=$BASEDIR --socket=mysql.sock \
+ --datadir=$DATADIR --pid-file=mysql.pid --tmpdir=$DATADIR $OPTIONS
+
+
+5. Grab the benchmark code and build it on the "client" machine. saw is probably a good choice.
+
+svn co svn+ssh://svn.csail.mit.edu/afs/csail/group/db/REPOS/relationalcloud.com/packdb/trunk/bench bench
+cd bench
+ant
+
+
+6. Run the mysql client on the client machine, and make sure it can connect to the test machine. Otherwise, you might need the appropriate "GRANT ALL ON tpcc.* TO root@'128.80.%';" (replacing the IP address as needed).
+
+
+7. Run the "warm the cache" script:
+
+mysql --user=root --host=* --port=3310 tpcc < run/sql/warm.sql > /dev/null
+
+
+8. Run a short test to make sure the damned thing works. This should run for 5 minutes and print out some results in CSV format at the end:
+
+java -cp ./build/classes:./lib/commons-lang-2.5.jar:./lib/mysql-connector-java-5.1.10-bin.jar -Dnwarehouses=32 -Dnterminals=160 -Ddriver=com.mysql.jdbc.Driver -Dconn=jdbc:mysql://HOSTNAME:3310/tpcc -Duser=root client.TPCCOverTime 300
+
+When I run this, it takes some time to warm up, but eventually mysqld uses ~ 800% CPU. When it finishes, it will dump some numbers to standard output in CSV format.
+
+
+9. Run the benchmark! Ideally this will actually work. It will take 60 minutes to run:
+
+java -cp ./build/classes:./lib/commons-lang-2.5.jar:./lib/mysql-connector-java-5.1.10-bin.jar -Dnwarehouses=32 -Dnterminals=160 -Ddriver=com.mysql.jdbc.Driver -Dconn=jdbc:mysql://HOSTNAME:3310/tpcc -Duser=root client.TPCCOverTime 3600 > mysql-direct.csv
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,44 @@
+
+#--------------CREATE-------------
+sourcedb=wikidb
+targetdb=wikidb_100p
+samplesize=1000
+
+# create schema from existing schema
+echo "CREATE TABLE $targetdb.page LIKE $sourcedb.page;";
+echo "CREATE TABLE $targetdb.revision LIKE $sourcedb.revision;";
+echo "CREATE TABLE $targetdb.text LIKE $sourcedb.text;";
+echo "ALTER TABLE $targetdb.text ADD COLUMN old_page int;"
+echo "CREATE TABLE $targetdb.recentchanges LIKE $sourcedb.recentchanges;";
+echo "CREATE TABLE $targetdb.logging LIKE $sourcedb.logging;";
+echo "CREATE TABLE $targetdb.user LIKE $sourcedb.user;";
+echo "CREATE TABLE $targetdb.user_groups LIKE $sourcedb.user_groups;";
+echo "CREATE TABLE $targetdb.watchlist LIKE $sourcedb.watchlist;";
+echo "CREATE TABLE $targetdb.page_restrictions LIKE $sourcedb.page_restrictions;";
+echo "CREATE TABLE $targetdb.ipblocks LIKE $sourcedb.ipblocks;";
+
+# sample page table
+echo "INSERT INTO $targetdb.page (SELECT * FROM $sourcedb.page ORDER BY page_random LIMIT $samplesize);"
+
+# get corresponding revision and text
+echo "INSERT INTO $targetdb.revision (SELECT r.* FROM $targetdb.page p, $source.revision r WHERE r.rev_page = p.page_id);"
+echo "INSERT INTO $targetdb.text (SELECT t.* FROM $targetdb.revision r, $sourcedb.text t WHERE r.rev_text_id=t.old_id);"
+
+# update text table to contain old_page
+echo "UPDATE $targetdb.text t, $targetdb.revision r SET t.old_page = r.rev_page WHERE t.old_id = r.rev_text_id;"
+
+# extract info about users from page table
+echo "INSERT INTO $targetdb.user SELECT distinct rev_user, rev_user_text, rev_user_text, "","","20101004183130","fake_something@something.com","fake_longoptionslist","20101004183130","b5ded708b23c820ba269da457f3b2cad",null,null,null,null,1 FROM $targetdb.revision WHERE rev_user > 0 GROUP BY rev_user;"
+
+# add whatever we have for groups and page_restrictions
+echo "INSERT INTO $targetdb.user_groups SELECT * FROM $sourcedb.user_groups;"
+echo "INSERT INTO $targetdb.page_restrictions select r.* from $targetdb.page p, $sourcedb.page_restrictions r where r.pr_page = p.page_id;"
+
+# save the data needed to revert to this state semi-quickly
+echo "CREATE TABLE $targetdb.page_backup LIKE $targetdb.page;"
+echo "CREATE TABLE $targetdb.value_backup (table_name varchar(255), maxid int(11));"
+echo "INSERT INTO $targetdb.page_backup SELECT * FROM $targetdb.page;"
+echo "INSERT INTO $targetdb.value_backup SELECT \"text\", max(old_id) FROM $targetdb.text;"
+echo "INSERT INTO $targetdb.value_backup SELECT \"revision\", max(rev_id) FROM $targetdb.revision;"
+
+
@@ -0,0 +1,118 @@
+//------------------------------------------------------------------
+// FROM THE selectPage TRANSACTION
+//------------------------------------------------------------------
+
+ORIGINAL: SELECT * FROM `user` WHERE user_id = ? LIMIT 1
+
+(user_id is primary key)
+
+ON NEW: SELECT * FROM `user` WHERE user_id = ? LIMIT 1
+IF EMPTY
+ ON OLD (cacheable): SELECT * FROM `user` WHERE user_id = ? LIMIT 1
+ ON NEW (cacheable): INSERT IGNORE INTO `user` VALUES(results from above);
+ ON NEW (cacheable): SELECT * FROM `user` WHERE user_id = ? LIMIT 1
+
+//------------------------------------------------------------------
+ORIGINAL: SELECT ug_group FROM `user_groups` WHERE ug_user = ?
+
+(prefix of unique key, but can't guarantee we have all data)
+
+ON OLD (cacheable): SELECT * FROM `user_groups` WHERE ug_user = ?
+ON NEW (cacheable): INSERT IGNORE INTO `user_groups` VALUES(results from above);
+ON NEW: SELECT * FROM `user` WHERE user_id = ? LIMIT 1
+
+//------------------------------------------------------------------
+
+ORIGINAL: SELECT * FROM `page` WHERE page_namespace = ? AND page_title = ? LIMIT 1
+
+(unique key)
+
+ON NEW: SELECT * FROM `page` WHERE page_namespace = ? AND page_title = ? LIMIT 1
+IF EMPTY
+ ON OLD (cacheable): SELECT * FROM `page` WHERE page_namespace = ? AND page_title = ? LIMIT 1
+ ON NEW (cacheable): INSERT IGNORE INTO `page` VALUES(results from above);
+ ON NEW (cacheable): SELECT * FROM `page` WHERE page_namespace = ? AND page_title = ? LIMIT 1
+
+//------------------------------------------------------------------
+
+ORIGINAL: SELECT * FROM `page_restrictions` WHERE pr_page = ?
+
+(this is a unique key prefix which could be managed some smart way, but for now we just do simple stuff)
+
+ON OLD (cacheable): SELECT * FROM `page_restrictions` WHERE pr_page = ?
+ON NEW (cacheable): INSERT IGNORE INTO `page_restrictions` VALUES(results from above);
+ON NEW: SELECT * FROM `page_restrictions` WHERE pr_page = ?
+
+
+//------------------------------------------------------------------
+
+ORIGINAL: SELECT * FROM `ipblocks` WHERE ipb_user = ?
+
+(general purpose, however is small table, we might want to get everything ahead of time)
+
+ON OLD (cacheable): SELECT * FROM `ipblocks` WHERE ipb_user = ?
+ON NEW (cacheable): INSERT IGNORE INTO `ipblocks` VALUES(results from above);
+ON NEW: SELECT * FROM `ipblocks` WHERE ipb_user = ?
+
+
+//------------------------------------------------------------------
+
+ORIGINAL: SELECT * FROM `page`,`revision` WHERE (page_id=rev_page) AND rev_page = ? AND page_id = ? AND (rev_id=page_latest) LIMIT 1
+
+(OPTION1:general purpose solution, always valid)
+ON OLD (cacheable): SELECT * FROM `page` WHERE page_id = ?;
+ON NEW (cacheable): INSERT IGNORE INTO `page` VALUES(results from above);
+ON OLD (cacheable): SELECT * FROM `revision` WHERE rev_page = ?; //return many many tuples (that anyway we eventually need)
+ON NEW (cacheable): INSERT IGNORE INTO `revision` VALUES(results from above);
+ON NEW: SELECT * FROM `page`,`revision` WHERE (page_id=rev_page) AND rev_page = ? AND page_id = ? AND (rev_id=page_latest) LIMIT 1
+
+(OPTION2: special trick, rev_id=page_lates is a FK-PK query, and page_id is equality of PK)
+
+ON OLD (cacheable): SELECT p.* FROM `page` p,`revision` r WHERE (page_id=rev_page) AND rev_page = ? AND page_id = ? AND (rev_id=page_latest) LIMIT 1
+ON NEW (cacheable): INSERT IGNORE INTO `page` VALUES(results from above);
+ON OLD (cacheable): SELECT r.* FROM `page` p,`revision` r WHERE (page_id=rev_page) AND rev_page = ? AND page_id = ? AND (rev_id=page_latest) LIMIT 1
+ON NEW (cacheable): INSERT IGNORE INTO `revision` VALUES(results from above);
+ON NEW: SELECT * FROM `page`,`revision` WHERE (page_id=rev_page) AND rev_page = ? AND page_id = ? AND (rev_id=page_latest) LIMIT 1
+
+(OPTION3: equivalent to option 2 but I can just select * and extract tuples from resultset)
+ON OLD (cacheable): SELECT p.*, r.* FROM `page` p,`revision` r WHERE (page_id=rev_page) AND rev_page = ? AND page_id = ? AND (rev_id=page_latest) LIMIT 1
+ON NEW (cacheable): INSERT IGNORE INTO `page` VALUES(first part of results from above);
+ON NEW (cacheable): INSERT IGNORE INTO `revision` VALUES(second part of results from above);
+ON NEW: SELECT * FROM `page`,`revision` WHERE (page_id=rev_page) AND rev_page = ? AND page_id = ? AND (rev_id=page_latest) LIMIT 1
+
+//------------------------------------------------------------------
+
+ORIGINAL: SELECT old_text,old_flags FROM `text` WHERE old_id = ? LIMIT 1
+
+(user_id is primary key)
+
+ON NEW: SELECT old_text,old_flags FROM `text` WHERE old_id = ? LIMIT 1
+IF EMPTY
+ ON OLD (cacheable): SELECT * FROM `text` WHERE old_id = ? LIMIT 1
+ ON NEW (cacheable): INSERT IGNORE INTO `text` VALUES(results from above);
+ ON NEW (cacheable): SELECT old_text,old_flags FROM `text` WHERE old_id = ? LIMIT 1
+
+
+//------------------------------------------------------------------
+// FROM THE selectPage TRANSACTION
+//------------------------------------------------------------------
+
+ORIGINAL: INSERT IGNORE INTO `watchlist` (wl_user,wl_namespace,wl_title,wl_notificationtimestamp) VALUES (?,?,?,NULL);
+
+ON OLD (cacheable): SELECT * FROM watchlist WHERE wl_user=? AND wl_namespace = ? AND wl_title=? (the where clause is the intersection of the above and the unique/primary keys)
+ON NEW (cacheable): INSERT IGNORE INTO watchlsit VALUES (results from above);
+ON NEW: INSERT IGNORE INTO `watchlist` (wl_user,wl_namespace,wl_title,wl_notificationtimestamp) VALUES (?,?,?,NULL);
+
+//------------------------------------------------------------------
+
+ORIGINAL: UPDATE `user` SET user_touched = ? WHERE user_id = ?;
+
+ON NEW: UPDATE `user` SET user_touched = ? WHERE user_id = ?;
+IF NO ROWS MATCHED
+ ON OLD (cacheable): SELECT * FROM user WHERE user_id=?
+ ON NEW (cacheable): INSERT IGNORE INTO user VALUES (results from above);
+ ON NEW (cacheable): UPDATE `user` SET user_touched = ? WHERE user_id = ?;
+
+
+
+
View
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
View
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<plugins>
+ <plugin name="tpcc">com.oltpbenchmark.tpcc.TPCCRateLimited</plugin>
+ <plugin name="wikipedia">com.oltpbenchmark.wikipedia.WikipediaBenchmark</plugin>
+</plugins>
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<parameters>
+ <driver>com.mysql.jdbc.Driver</driver>
+ <DBUrl>jdbc:mysql://127.0.0.1:3306/test</DBUrl>
+ <DBName>tests</DBName>
+ <username>root</username>
+ <password>hello</password>
+ <terminals>10</terminals>
+ <numWarehouses>10</numWarehouses>
+ <works>
+ <work>
+ <time>5</time>
+ <rate>100</rate>
+ <weights>0,0,0,0,100</weights>
+ </work>
+ <work>
+ <time>2</time>
+ <rate>200</rate>
+ <weights>20,20,20,20,20</weights>
+ </work>
+ <work>
+ <time>10</time>
+ <rate>20</rate>
+ <weights>30,10,0,40,20</weights>
+ </work>
+ </works>
+</parameters>
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<parameters>
+ <driver>com.mysql.jdbc.Driver</driver>
+ <DBUrl>jdbc:mysql://127.0.0.1:3306/wiki</DBUrl>
+ <DBName>wiki</DBName>
+ <username>root</username>
+ <password>pass</password>
+ <terminals>160</terminals>
+ <trace>tracefile.trc</trace>
+ <base_ip>10.1.</base_ip>
+ <works>
+ <work>
+ <time>5</time>
+ <rate>100</rate>
+ <weights>0,0,0,0,100</weights>
+ </work>
+ <work>
+ <time>2</time>
+ <rate>200</rate>
+ <weights>20,20,20,20,20</weights>
+ </work>
+ <work>
+ <time>10</time>
+ <rate>20</rate>
+ <weights>30,10,0,40,20</weights>
+ </work>
+ </works>
+</parameters>
View
Binary file not shown.
@@ -0,0 +1,23 @@
+Number of Terminals 10
+
+Terminal Home Warehouse
+Term-w1d1-10 1
+Term-w2d1-10 2
+Term-w3d1-10 3
+Term-w4d1-10 4
+Term-w5d1-10 5
+Term-w6d1-10 6
+Term-w7d1-10 7
+Term-w8d1-10 8
+Term-w9d1-10 9
+Term-w10d1-10 10
+
+Transaction Weight
+% New-Order 45
+% Payment 43
+% Order-Status 4
+% Delivery 4
+% Stock-Level 4
+
+
+Transaction Number Terminal Type Execution Time (ms) Comment
Oops, something went wrong.

0 comments on commit ef3cbe7

Please sign in to comment.