Skip to main content

Architecture

Anatomy of TAOBench

Architecture

TAOBech consists of several components, all of which are in taobench/src.

  • Workload config: The benchmark takes in a workload configuration file to specify request pattern distributions.
  • Benchmark driver: The driver is the core component of TAOBench and can be distributed across multiple machines.
    • Workload generator: The generator loads keys before sending requests to these keys.
    • Client threads: Each client thread independently executes requests.
    • Data store adapter layer: Requests are converted to the API of the specified data store.

When TAOBench starts up, it reads in the workload config file and launches the driver to pre-generate keys in the data store. Once the load phase is complete, the benchmark then sends requests via client threads with the frequency and duration specified by the user.

Workload Configurations

A workload configuration file contains distributions of required workload parameters. As described in the TAOBench paper, the parameters are transaction size, sharding strategy, operation type, data size, association types, preconditions, and read tiers. They can be specifed as discrete or piecewise linear probability distributions.

There are currently three open-source workload configurations based on Meta's workload:

  • Workload T (workload_t.json): The transactional workload represents all requests to keys involved in existing write transactions on TAO.
  • Workload A (workload_a.json): The application workload that captures requests with transactional intent, inluding ones that do not use TAO's transactional API in production but may use it in the future.
  • Workload O (workload_o.json): The overall TAO workload that is notably read-heavy.
Example config (Workload O)
{"name": "operations", "weights": [8387,19,242,1]}
{"name": "write_txn_sizes", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103], "weights": [0, 104440, 283626, 340601, 43853, 5878, 107888, 674, 862, 235, 409, 196, 409, 150, 332, 20, 288, 12, 494, 10, 51871, 7, 17, 8, 15, 20160, 6, 0, 7, 3, 7, 1, 8, 3, 4, 1, 6, 0, 10, 0, 8, 1, 1, 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1]}
{"name": "read_txn_sizes", "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500], "weights": [0, 553162, 311751, 166458, 106694, 80485, 62975, 53430, 33268, 27819, 36732, 21447, 18031, 15122, 14191, 12506, 10894, 10053, 9326, 8482, 7752, 7189, 6773, 6265, 5995, 5982, 5503, 5473, 4896, 5001, 9323, 4619, 4773, 4323, 3927, 4634, 4598, 4356, 3803, 3888, 3814, 3544, 3498, 3422, 3373, 3057, 3038, 3220, 3100, 2961, 2824, 2687, 2780, 2796, 2831, 2622, 2576, 2336, 2090, 2160, 2074, 2062, 2054, 2075, 1980, 2231, 2105, 2052, 2006, 2088, 1846, 1871, 1925, 1766, 1649, 1751, 1651, 2337, 1736, 1602, 1527, 1504, 1447, 1493, 1336, 1438, 1332, 1503, 1310, 1397, 1372, 1497, 1370, 1376, 1406, 1535, 1605, 1646, 1658, 1846, 1266, 1235, 1199, 1147, 1066, 1099, 1008, 1082, 966, 1023, 847, 941, 1034, 857, 795, 662, 714, 719, 619, 606, 617, 617, 588, 576, 590, 612, 537, 654, 664, 679, 539, 570, 519, 508, 562, 539, 476, 493, 510, 557, 531, 518, 522, 527, 518, 508, 492, 537, 574, 497, 582, 558, 560, 488, 585, 521, 603, 556, 516, 578, 487, 523, 512, 495, 530, 578, 554, 532, 576, 596, 520, 525, 508, 615, 548, 444, 592, 458, 561, 524, 569, 538, 519, 635, 462, 921, 446, 472, 400, 407, 399, 445, 394, 547, 437, 442, 416, 406, 392, 332, 304, 265, 252, 243, 259, 245, 246, 274, 190, 260, 271, 230, 206, 212, 213, 208, 209, 249, 214, 240, 214, 204, 218, 205, 199, 205, 193, 173, 186, 170, 219, 168, 204, 191, 173, 170, 171, 222, 190, 172, 185, 204, 172, 171, 204, 146, 167, 186, 140, 137, 151, 137, 122, 152, 139, 151, 102, 105, 128, 202, 127, 125, 116, 121, 146, 110, 127, 80, 104, 120, 113, 117, 131, 131, 111, 100, 97, 110, 99, 123, 84, 107, 134, 74, 79, 110, 105, 110, 63, 75, 106, 92, 89, 101, 95, 84, 88, 87, 80, 92, 101, 92, 81, 83, 73, 61, 79, 114, 76, 70, 67, 110, 93, 81, 79, 70, 73, 86, 92, 78, 71, 83, 71, 71, 87, 79, 88, 78, 102, 102, 90, 93, 68, 68, 72, 113, 88, 107, 79, 72, 58, 75, 57, 70, 48, 61, 48, 73, 40, 63, 74, 61, 72, 58, 61, 62, 51, 48, 63, 49, 65, 39, 78, 70, 64, 54, 55, 59, 51, 61, 64, 56, 44, 45, 76, 63, 62, 56, 65, 67, 63, 61, 57, 79, 92, 76, 81, 96, 71, 117, 96, 78, 59, 83, 53, 65, 77, 44, 48, 56, 57, 50, 63, 57, 40, 62, 28, 61, 45, 63, 52, 27, 66, 53, 58, 59, 60, 56, 51, 78, 47, 54, 50, 50, 27, 36, 57, 46, 62, 53, 38, 39, 46, 54, 51, 29, 30, 39, 37, 42, 52, 39, 42, 58, 38, 36, 36, 95, 29, 45, 26, 48, 37, 29, 58, 50, 34, 38, 29, 42, 44, 32, 37, 28, 27, 31, 30, 47, 34, 57, 40, 34, 52, 48, 23, 45, 22, 33, 38, 29, 37, 27, 27, 41, 40, 36, 40, 41, 53, 32, 39, 45, 27, 70, 48, 41, 43, 18, 28, 44]}
{"name": "edge_types", "values": ["unique", "bidirectional", "unique_and_bidirectional", "other"], "weights": [100, 130, 109, 366]}
{"name": "read_operation_types", "values": ["obj_read", "edge_point_read", "edge_range_read", "edge_count_read", "edge_time_read"], "weights": [479, 475, 0, 0, 0]}
{"name": "write_operation_types", "values": ["obj_add", "obj_update", "obj_delete", "edge_add", "edge_update", "edge_delete"], "weights": [219, 75, 0, 1, 321, 0]}
{"name": "read_txn_operation_types", "values": ["obj_read", "edge_point_read"], "weights": [1, 5]}
{"name": "write_txn_operation_types", "values": ["obj_add", "obj_update", "obj_delete", "edge_add", "edge_update", "edge_delete"], "weights": [219, 75, 0, 1, 321, 0]}
{"name": "read_operation_latency", "weights": [0, 0.16, 0.16, 0.17, 0.17, 0.17, 0.17]}
{"name": "write_operation_latency", "weights": [0, 0.16, 0.16, 0.17, 0.17, 0.17, 0.17]}
{"name": "write_txn_latency", "weights": [0, 0.16, 0.16, 0.17, 0.17, 0.17, 0.17]}
{"name": "primary_shards", "weights": [94036,36224,3600,612,612,612,612,612,614,612,612,612,612,612,612,612,614,612,612,612,612,612,612,612,612,614,612,612,612,612,612,612,612,614,612,612,612,612,612,612,612,614,612,612,612,612,612,612,612,600]}
{"name": "remote_shards", "weights": [31712,2563,1925,1722,1663,1620,1037,679,381,247,176,149,130,119,112,99,96,89,80,80,76,64,64,64,64,48,48,48,48,48,45,32,32,32,32,32,32,32,32,17,16,16,16,16,16,16,16,16,16,15]}
{"name": "errors", "values": ["success", "fail_after_reserve", "fail_after_primary_commit", "fail_after_primary_rollback"], "weights": [1, 0, 0, 0]}
{"name": "txn_errors", "values": ["success", "fail_after_reserve", "fail_after_primary_commit", "fail_after_primary_rollback"], "weights": [1, 0, 0, 0]}
{"name": "operation_predicates", "values": ["write_visibility", "write_update_only", "write_version", "none"], "weights": [14, 42, 20, 924]}
{"name": "txn_predicates", "values": ["read_visibiliy", "read_version", "write_visibility", "write_version", "none"], "weights": [0.2, 0.2, 0.2, 0.2, 0.2]}
{"name": "txn_predicate_counts", "weights": [0.8, 0.1, 0.1]}
{"name": "read_tiers", "values": ["client_cache", "tao", "db"], "weights": [14, 85, 1]}