Created
May 30, 2022 07:06
-
-
Save wwwted/170f0aa4db27c3fe19a6e043e09ec8ae to your computer and use it in GitHub Desktop.
FlexAsynch build for NDN 8.0 on Oracle Linux 8.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My notes on building flexAsynch from source code on Oracle Linux 8.0. | |
Build MySQL Cluster from source docs: | |
- https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-install-linux-source.html | |
- https://dev.mysql.com/doc/refman/8.0/en/source-installation-prerequisites.html | |
On Oracle Linux 8.0 | |
=================== | |
Prerequisites for building our source code: | |
sudo yum install cmake | |
sudo yum install gcc-c++ | |
sudo yum install gcc-toolset-10-gcc gcc-toolset-10-gcc-c++ gcc-toolset-10-binutils | |
sudo yum install ncurses-devel | |
sudo yum install bison | |
sudo yum install openssl-devel | |
sudo yum install libtirpc-devel | |
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | |
sudo dnf config-manager --set-enabled ol8_codeready_builder | |
(^^ above might differ on RHEL and CentOS) | |
sudo dnf install rpcgen | |
Complete NDB Build | |
1) Create the new build in folder /home/opc/ndb8027: mkdir /home/opc/ndb8027 | |
2) cd /home/opc/ndb8027 | |
3) Download cluster src code: wget https://downloads.mysql.com/archives/get/p/14/file/mysql-cluster-gpl-8.0.27.tar.gz | |
4) Unpack src code: tar xzf mysql-cluster-gpl-8.0.27.tar.gz | |
5) Create folder for binaries: mkdir ndb8027bin | |
6) Go into folder with src code: cd /home/opc/ndb8027/mysql-cluster-gpl-8.0.27/ | |
7) Create a build folder: mkdir build20220524_1 | |
8) Go into build folder (cd build20220524_1) create the build: | |
- cmake .. -DCMAKE_INSTALL_PREFIX=/home/opc/ndb8027/ndb8027bin -DWITH_NDBCLUSTER=ON -DWITH_NDB_TEST=ON -DWITH_NDB_JAVA=OFF | |
-DDOWNLOAD_BOOST=1 -DWITH_BOOST=/home/opc/ndb8027/mysql-cluster-gpl-8.0.27/boost/ | |
- make | |
- make install | |
Do build of only flexAsynch (I prefer this one, it's much quicker but depends on ninja) | |
This process will build flexasync using Ninja: | |
1) Install Nijna: sudo yum install ninja-build | |
2) Go into build folder (cd build20220524_1) | |
- cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=/home/opc/ndb8027/ndb8027bin -DWITH_NDBCLUSTER=ON -DWITH_NDB_TEST=ON -DWITH_NDB_JAVA=OFF | |
-DDOWNLOAD_BOOST=1 -DWITH_BOOST=/home/opc/ndb8027/mysql-cluster-gpl-8.0.27/boost/ | |
- ninja flexAsynch | |
flexAsynch binary will be in build folder runtime_output_directory/flexAsynch. | |
Run flexAsynch | |
If you have specific install directory as above run: | |
export LD_LIBRARY_PATH=/home/ted/src/mysql-cluster-8.0.28-linux-glibc2.12-x86_64/lib/ | |
To be able to connect to management node of cluster: export NDB_CONNECTSTRING="host=$NDB_HOST:$NDB_PORT" | |
Simple testrun: | |
flexAsynch | |
..... | |
Dropping table TAB0_2059048975... | |
insert average: 114285/s min: 114285/s max: 114285/s stddev: 0% | |
update average: 114285/s min: 114285/s max: 114285/s stddev: 0% | |
delete average: 133333/s min: 133333/s max: 133333/s stddev: 0% | |
read average: 160000/s min: 160000/s max: 160000/s stddev: 0% | |
Then just change the setting to use more threads and larger transactions with more operations like below for example: | |
./flexAsynch -p 80 -t 20 -l 2 -o 800 -c 300 -n -a 50 | |
-t Number of threads to start, default 1 | |
-p Number of parallel transactions per thread, default 32 | |
-o Number of transactions per loop, default 500 | |
-l Number of loops to run, default 1, 0=infinite | |
-a Number of attributes, default 25 | |
-c Number of operations per transaction | |
If you want to manually create table and run tests use: | |
1) ./flexAsynch -table 20 -create_table | |
2) ./flexAsynch -table 20 -insert | |
3) ./flexAsynch -table 20 -delete | |
4) ./flexAsynch -table 20 -delete | |
5) ./flexAsynch -table 20 -drop_table | |
You can see the table via: ndb_show_tables | |
It's created in schema TEST_DB and named TAB<tableNoFromAbove>_0 | |
Look at table statitics: ndb_desc -d TEST_DB TAB20_0 -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment