From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: buildroot@buildroot.org
Cc: Sergey Romanov <svromanov@salutedevices.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Sergey Romanov <svromanov@sberdevices.ru>,
Angelo Compagnucci <angelo.compagnucci@gmail.com>
Subject: [Buildroot] [PATCH v3 2/2] package/sysbench: new package
Date: Sat, 21 Nov 2026 19:02:19 +0100 [thread overview]
Message-ID: <20261121180219.3583305-2-angelo.compagnucci@gmail.com> (raw)
In-Reply-To: <20261121180219.3583305-1-angelo.compagnucci@gmail.com>
From: Sergey Romanov <svromanov@sberdevices.ru>
This benchmark was designed for identifying basic
system parameters, as they are important for system
using MySQL (w Innodb) under intensive load.
Handling of IO in case of many parallel requests,
checked as well as memory allocation/transfer
speed and scheduler performance.
CPU is benchmarked by using 64bit integer manipulation
using Euklid algorithms for prime number computation.
Benchmarks are designed to show benefit of multiple
CPUs as well as of multiple hard drives,
battery backed up write cache.
https://github.com/akopytov/sysbench.git
Signed-off-by: Sergey Romanov <svromanov@salutedevices.com>
Co-authored-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
Changes v2 -> v3:
- do not select the target pkgconf and libtool packages: host-pkgconf
is already a build dependency, and autoreconf brings host-libtool
- add the comment for the toolchain dependencies
- add a runtime test, on ARMv7: it runs short cpu (two threads) and
memory tests, under a second each
- .mk file: header in lower case, fix the ifeq spacing
- help text: link to the project page, not the git URL
- DEVELOPERS: add Angelo Compagnucci too
- rebase on master
Supersedes v2: https://patchwork.buildroot.org/project/buildroot/patch/20231117094429.30820-3-svromanov@salutedevices.com/
DEVELOPERS | 4 +++
package/Config.in | 1 +
package/sysbench/Config.in | 32 +++++++++++++++++
package/sysbench/sysbench.hash | 3 ++
package/sysbench/sysbench.mk | 31 +++++++++++++++++
.../testing/tests/package/test_sysbench.py | 34 +++++++++++++++++++
6 files changed, 105 insertions(+)
create mode 100644 package/sysbench/Config.in
create mode 100644 package/sysbench/sysbench.hash
create mode 100644 package/sysbench/sysbench.mk
create mode 100644 support/testing/tests/package/test_sysbench.py
diff --git a/DEVELOPERS b/DEVELOPERS
index 5812ce6484..d2175d4f6f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -264,8 +264,10 @@ F: package/rtl8723ds-bt/
F: package/sam-ba/
F: package/sshguard/
F: package/sunwait/
+F: package/sysbench/
F: package/sysdig/
F: package/uthash/
+F: support/testing/tests/package/test_sysbench.py
N: Andy Shevchenko <andy.shevchenko@gmail.com>
F: package/fb-test-app/
@@ -3103,6 +3105,8 @@ F: package/xr819-xradio/
N: Sergey Romanov <svromanov@salutedevices.com>
F: package/ck/
+F: package/sysbench/
+F: support/testing/tests/package/test_sysbench.py
N: Sergio Prado <sergio.prado@e-labworks.com>
F: package/aoetools/
diff --git a/package/Config.in b/package/Config.in
index 199f8b0bc7..a72ad20b54 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -149,6 +149,7 @@ menu "Debugging, profiling and benchmark"
source "package/strace/Config.in"
source "package/stress/Config.in"
source "package/stress-ng/Config.in"
+ source "package/sysbench/Config.in"
source "package/sysdig/Config.in"
source "package/sysprof/Config.in"
source "package/tbtools/Config.in"
diff --git a/package/sysbench/Config.in b/package/sysbench/Config.in
new file mode 100644
index 0000000000..e30f691081
--- /dev/null
+++ b/package/sysbench/Config.in
@@ -0,0 +1,32 @@
+config BR2_PACKAGE_SYSBENCH_ARCH_SUPPORTS
+ bool
+ default y if !BR2_powerpc
+
+config BR2_PACKAGE_SYSBENCH
+ bool "sysbench"
+ depends on BR2_PACKAGE_SYSBENCH_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_CK_ARCH_SUPPORTS
+ depends on !BR2_STATIC_LIBS # luajit
+ depends on !BR2_PACKAGE_LUA # luajit
+ depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS # luajit
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ select BR2_PACKAGE_LUAJIT
+ select BR2_PACKAGE_CK
+ help
+ This benchmark was designed for identifying basic system
+ parameters, as they are important for system using MySQL (w
+ Innodb) under intensive load. Handling of IO in case of many
+ parallel requests, checked as well as memory allocation
+ /transfer speed and scheduler performance. CPU is benchmarked
+ by using 64bit integer manipulation using Euklid algorithms
+ for prime number computation. Benchmarks are designed to show
+ benefit of multiple CPUs as well as of multiple hard drives,
+ battery backed up write cache.
+
+ https://github.com/akopytov/sysbench
+
+comment "sysbench needs a toolchain w/ threads, dynamic library"
+ depends on BR2_PACKAGE_SYSBENCH_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_CK_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
+ depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
diff --git a/package/sysbench/sysbench.hash b/package/sysbench/sysbench.hash
new file mode 100644
index 0000000000..a31fdb1178
--- /dev/null
+++ b/package/sysbench/sysbench.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 e8ee79b1f399b2d167e6a90de52ccc90e52408f7ade1b9b7135727efe181347f sysbench-1.0.20.tar.gz
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
diff --git a/package/sysbench/sysbench.mk b/package/sysbench/sysbench.mk
new file mode 100644
index 0000000000..771745329a
--- /dev/null
+++ b/package/sysbench/sysbench.mk
@@ -0,0 +1,31 @@
+################################################################################
+#
+# sysbench
+#
+################################################################################
+
+SYSBENCH_VERSION = 1.0.20
+SYSBENCH_SITE = $(call github,akopytov,sysbench,$(SYSBENCH_VERSION))
+SYSBENCH_LICENSE = GPL-2.0+
+SYSBENCH_LICENSE_FILES = COPYING
+
+SYSBENCH_AUTORECONF = YES
+
+SYSBENCH_DEPENDENCIES = host-pkgconf ck luajit
+
+SYSBENCH_CONF_OPTS = \
+ --without-lib-prefix \
+ --with-system-luajit \
+ --with-system-ck
+
+ifeq ($(BR2_PACKAGE_MYSQL),y)
+SYSBENCH_DEPENDENCIES += mysql
+SYSBENCH_CONF_OPTS += \
+ --with-mysql \
+ --with-mysql-includes=$(STAGING_DIR)/usr/include/mysql \
+ --with-mysql-libs=$(STAGING_DIR)/usr/lib
+else
+SYSBENCH_CONF_OPTS += --without-mysql
+endif
+
+$(eval $(autotools-package))
diff --git a/support/testing/tests/package/test_sysbench.py b/support/testing/tests/package/test_sysbench.py
new file mode 100644
index 0000000000..45679bdd0e
--- /dev/null
+++ b/support/testing/tests/package/test_sysbench.py
@@ -0,0 +1,34 @@
+import os
+
+import infra.basetest
+
+
+class TestSysbench(infra.basetest.BRTest):
+ # ck does not support ARMv5, so use an ARMv7 toolchain
+ config = \
+ """
+ BR2_arm=y
+ BR2_cortex_a9=y
+ BR2_ARM_ENABLE_VFP=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
+ BR2_PACKAGE_SYSBENCH=y
+ BR2_TARGET_ROOTFS_CPIO=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
+
+ def test_run(self):
+ cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv7",
+ kernel="builtin",
+ options=["-initrd", cpio_file])
+ self.emulator.login()
+
+ self.assertRunOk("sysbench --version")
+ # Short runs, under a second each: the cpu test runs Lua code
+ # through luajit, and two threads use the ck primitives of the
+ # sysbench core
+ self.assertRunOk("sysbench cpu --threads=2 --cpu-max-prime=1000 --events=100 --time=0 run",
+ timeout=30)
+ self.assertRunOk("sysbench memory --memory-total-size=1M run",
+ timeout=30)
--
2.53.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-11-21 18:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 21:51 [Buildroot] [RFC PATCH v1 0/2] Added package: 'sysbench' and its dependency: 'ck' Sergey Romanov via buildroot
2023-05-25 21:51 ` [Buildroot] [RFC PATCH v1 1/2] package/ck: new package Sergey Romanov via buildroot
2023-08-25 21:33 ` Thomas Petazzoni via buildroot
2023-11-17 9:44 ` [Buildroot] [RFC PATCH v2 0/2] Added package: 'sysbench' and its dependency: 'ck' Sergey Romanov via buildroot
2023-11-17 9:44 ` [Buildroot] [RFC PATCH v2 1/2] package/ck: new package Sergey Romanov via buildroot
2023-11-17 9:44 ` [Buildroot] [RFC PATCH v2 2/2] package/sysbench: " Sergey Romanov via buildroot
2026-11-21 18:02 ` [Buildroot] [PATCH v3 1/2] package/ck: " Angelo Compagnucci
2026-11-21 18:02 ` Angelo Compagnucci [this message]
2023-05-25 21:51 ` [Buildroot] [RFC PATCH v1 2/2] package/sysbench: " Sergey Romanov via buildroot
2023-08-25 21:37 ` Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261121180219.3583305-2-angelo.compagnucci@gmail.com \
--to=angelo.compagnucci@gmail.com \
--cc=buildroot@buildroot.org \
--cc=svromanov@salutedevices.com \
--cc=svromanov@sberdevices.ru \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox