{"id":419,"date":"2025-01-16T15:01:25","date_gmt":"2025-01-16T15:01:25","guid":{"rendered":"http:\/\/77interactive.com\/?p=419"},"modified":"2025-01-16T15:02:28","modified_gmt":"2025-01-16T15:02:28","slug":"running-sysbench-on-mysql","status":"publish","type":"post","link":"http:\/\/77interactive.com\/?p=419","title":{"rendered":"Running Sysbench on MySQL"},"content":{"rendered":"\n<p>The following script is used to run sysbench on MySQL<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\n# Database connection details\nDB_USER=\"your_username\"\nDB_PASSWORD=\"your_password\"\nDB_NAME=\"your_database\"\n\n# Number of threads to use for the benchmark\nNUM_THREADS=4\n\n# Number of requests to perform\nNUM_REQUESTS=10000\n\n# Cleanup any previous test data\nsysbench --db-driver=mysql --mysql-user=$DB_USER --mysql-password=$DB_PASSWORD --mysql-db=$DB_NAME oltp_read_write cleanup\n\n# Prepare the test environment\nsysbench --db-driver=mysql --mysql-user=$DB_USER --mysql-password=$DB_PASSWORD --mysql-db=$DB_NAME oltp_read_write prepare\n\n# Run the benchmark\nsysbench --db-driver=mysql --mysql-user=$DB_USER --mysql-password=$DB_PASSWORD --mysql-db=$DB_NAME --threads=$NUM_THREADS --time=60 --report-interval=10 oltp_read_write run\n\n# Cleanup test data\nsysbench --db-driver=mysql --mysql-user=$DB_USER --mysql-password=$DB_PASSWORD --mysql-db=$DB_NAME oltp_read_write cleanup\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The following script is used to run sysbench on MySQL<\/p>\n","protected":false},"author":1,"featured_media":420,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[42,55],"class_list":["post-419","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-linux","tag-mysql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Running Sysbench on MySQL - 77 Interactive<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/77interactive.com\/?p=419\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Running Sysbench on MySQL - 77 Interactive\" \/>\n<meta property=\"og:description\" content=\"The following script is used to run sysbench on MySQL\" \/>\n<meta property=\"og:url\" content=\"http:\/\/77interactive.com\/?p=419\" \/>\n<meta property=\"og:site_name\" content=\"77 Interactive\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-16T15:01:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-16T15:02:28+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/77interactive.com\/wp-content\/uploads\/2025\/01\/dolphins001.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Rudy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rudy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/77interactive.com\/?p=419#article\",\"isPartOf\":{\"@id\":\"http:\/\/77interactive.com\/?p=419\"},\"author\":{\"name\":\"Rudy\",\"@id\":\"http:\/\/77interactive.com\/#\/schema\/person\/0e61d2a984b8304618026b207e6121e9\"},\"headline\":\"Running Sysbench on MySQL\",\"datePublished\":\"2025-01-16T15:01:25+00:00\",\"dateModified\":\"2025-01-16T15:02:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/77interactive.com\/?p=419\"},\"wordCount\":14,\"image\":{\"@id\":\"http:\/\/77interactive.com\/?p=419#primaryimage\"},\"thumbnailUrl\":\"http:\/\/77interactive.com\/wp-content\/uploads\/2025\/01\/dolphins001.jpg\",\"keywords\":[\"Linux\",\"mysql\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/77interactive.com\/?p=419\",\"url\":\"http:\/\/77interactive.com\/?p=419\",\"name\":\"Running Sysbench on MySQL - 77 Interactive\",\"isPartOf\":{\"@id\":\"http:\/\/77interactive.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/77interactive.com\/?p=419#primaryimage\"},\"image\":{\"@id\":\"http:\/\/77interactive.com\/?p=419#primaryimage\"},\"thumbnailUrl\":\"http:\/\/77interactive.com\/wp-content\/uploads\/2025\/01\/dolphins001.jpg\",\"datePublished\":\"2025-01-16T15:01:25+00:00\",\"dateModified\":\"2025-01-16T15:02:28+00:00\",\"author\":{\"@id\":\"http:\/\/77interactive.com\/#\/schema\/person\/0e61d2a984b8304618026b207e6121e9\"},\"breadcrumb\":{\"@id\":\"http:\/\/77interactive.com\/?p=419#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/77interactive.com\/?p=419\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/77interactive.com\/?p=419#primaryimage\",\"url\":\"http:\/\/77interactive.com\/wp-content\/uploads\/2025\/01\/dolphins001.jpg\",\"contentUrl\":\"http:\/\/77interactive.com\/wp-content\/uploads\/2025\/01\/dolphins001.jpg\",\"width\":1024,\"height\":1024,\"caption\":\"Dolphins\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/77interactive.com\/?p=419#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/77interactive.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Running Sysbench on MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/77interactive.com\/#website\",\"url\":\"http:\/\/77interactive.com\/\",\"name\":\"77 Interactive\",\"description\":\"Rudy&#039;s Code snippets\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/77interactive.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/77interactive.com\/#\/schema\/person\/0e61d2a984b8304618026b207e6121e9\",\"name\":\"Rudy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/77interactive.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e336b9aecd39b40691ff8ccfcd68506415072dbe8caffc0485b94a1bc22b774d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e336b9aecd39b40691ff8ccfcd68506415072dbe8caffc0485b94a1bc22b774d?s=96&d=mm&r=g\",\"caption\":\"Rudy\"},\"url\":\"http:\/\/77interactive.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Running Sysbench on MySQL - 77 Interactive","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/77interactive.com\/?p=419","og_locale":"en_US","og_type":"article","og_title":"Running Sysbench on MySQL - 77 Interactive","og_description":"The following script is used to run sysbench on MySQL","og_url":"http:\/\/77interactive.com\/?p=419","og_site_name":"77 Interactive","article_published_time":"2025-01-16T15:01:25+00:00","article_modified_time":"2025-01-16T15:02:28+00:00","og_image":[{"width":1024,"height":1024,"url":"http:\/\/77interactive.com\/wp-content\/uploads\/2025\/01\/dolphins001.jpg","type":"image\/jpeg"}],"author":"Rudy","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Rudy","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/77interactive.com\/?p=419#article","isPartOf":{"@id":"http:\/\/77interactive.com\/?p=419"},"author":{"name":"Rudy","@id":"http:\/\/77interactive.com\/#\/schema\/person\/0e61d2a984b8304618026b207e6121e9"},"headline":"Running Sysbench on MySQL","datePublished":"2025-01-16T15:01:25+00:00","dateModified":"2025-01-16T15:02:28+00:00","mainEntityOfPage":{"@id":"http:\/\/77interactive.com\/?p=419"},"wordCount":14,"image":{"@id":"http:\/\/77interactive.com\/?p=419#primaryimage"},"thumbnailUrl":"http:\/\/77interactive.com\/wp-content\/uploads\/2025\/01\/dolphins001.jpg","keywords":["Linux","mysql"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/77interactive.com\/?p=419","url":"http:\/\/77interactive.com\/?p=419","name":"Running Sysbench on MySQL - 77 Interactive","isPartOf":{"@id":"http:\/\/77interactive.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/77interactive.com\/?p=419#primaryimage"},"image":{"@id":"http:\/\/77interactive.com\/?p=419#primaryimage"},"thumbnailUrl":"http:\/\/77interactive.com\/wp-content\/uploads\/2025\/01\/dolphins001.jpg","datePublished":"2025-01-16T15:01:25+00:00","dateModified":"2025-01-16T15:02:28+00:00","author":{"@id":"http:\/\/77interactive.com\/#\/schema\/person\/0e61d2a984b8304618026b207e6121e9"},"breadcrumb":{"@id":"http:\/\/77interactive.com\/?p=419#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/77interactive.com\/?p=419"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/77interactive.com\/?p=419#primaryimage","url":"http:\/\/77interactive.com\/wp-content\/uploads\/2025\/01\/dolphins001.jpg","contentUrl":"http:\/\/77interactive.com\/wp-content\/uploads\/2025\/01\/dolphins001.jpg","width":1024,"height":1024,"caption":"Dolphins"},{"@type":"BreadcrumbList","@id":"http:\/\/77interactive.com\/?p=419#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/77interactive.com\/"},{"@type":"ListItem","position":2,"name":"Running Sysbench on MySQL"}]},{"@type":"WebSite","@id":"http:\/\/77interactive.com\/#website","url":"http:\/\/77interactive.com\/","name":"77 Interactive","description":"Rudy&#039;s Code snippets","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/77interactive.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/77interactive.com\/#\/schema\/person\/0e61d2a984b8304618026b207e6121e9","name":"Rudy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/77interactive.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e336b9aecd39b40691ff8ccfcd68506415072dbe8caffc0485b94a1bc22b774d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e336b9aecd39b40691ff8ccfcd68506415072dbe8caffc0485b94a1bc22b774d?s=96&d=mm&r=g","caption":"Rudy"},"url":"http:\/\/77interactive.com\/?author=1"}]}},"_links":{"self":[{"href":"http:\/\/77interactive.com\/index.php?rest_route=\/wp\/v2\/posts\/419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/77interactive.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/77interactive.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/77interactive.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/77interactive.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=419"}],"version-history":[{"count":0,"href":"http:\/\/77interactive.com\/index.php?rest_route=\/wp\/v2\/posts\/419\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/77interactive.com\/index.php?rest_route=\/wp\/v2\/media\/420"}],"wp:attachment":[{"href":"http:\/\/77interactive.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/77interactive.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/77interactive.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}