From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 008CA192B015; Tue, 13 Jan 2026 18:30:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 008CA192B015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1768318234; bh=KYnMPYNIsFfraze5GxJdCbJ/kXPshqjShzVhgFpi7RU=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=f2oF23Y07uIbTNPtpbKJe8J0Byaowz+TKUsn3SeYqv5CbW5+QKCZ2SoSB8FHfWU35 ig+kBJEiXiErRDEAIAE960P03UonqGm5dQ3vSP/oSiERs7vX02PulGnKrzba8mMEZT y20YtVpsp//2c9Cpa6Ep/03q/6Iue8vAjwyGPV6I= Received: from send218.i.mail.ru (send218.i.mail.ru [95.163.59.57]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id DD152192B013 for ; Tue, 13 Jan 2026 18:30:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DD152192B013 Received: by exim-smtp-7b4fb89df9-xz65l with esmtpa (envelope-from ) id 1vfgLn-00000000DhE-3vck; Tue, 13 Jan 2026 18:30:32 +0300 Content-Type: multipart/alternative; boundary="------------woBu5DMwdmA0p0rV89nw9EdR" Message-ID: Date: Tue, 13 Jan 2026 18:30:31 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: <4d59c0371b1577651d63fdaef05b2e6c66d6464c.1766738771.git.skaplun@tarantool.org> In-Reply-To: <4d59c0371b1577651d63fdaef05b2e6c66d6464c.1766738771.git.skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD979975AF0D777FEBDD803ECE58504FBFD117E6A90C4FE9736182A05F538085040802ADAF3B24C316D3DE06ABAFEAF6705B1C749EB40897772B2CDCC1786F964BC55057FA91F6F9B79 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76ABD3380F320B62CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637FE9EFE935CD7C6AE8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2144BFC484231F33A2E070BE324C7D3C4B6CEB0597C390FE8F6B57BC7E64490618DEB871D839B73339E8FC8737B5C2249D082881546D93491CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C0D9442B0B5983000E8941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD269176DF2183F8FC7C093FFA1BBD54C76087B076A6E789B0E97A8DF7F3B2552694AD5FFEEA1DED7F25D49FD398EE364050F26055571C92BF10FE2071C6999E77799B3661434B16C20ACC84D3B47A649675FE827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B779389CF6F126FEC75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A56812AC1782BFBA265002B1117B3ED696ED77049105BFDC6992B673A2F5DDD7E7823CB91A9FED034534781492E4B8EEAD577AE849BCD98940BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE191716CD42B3DD1D34CAB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D659642C365D05C8B826E41957777DD2BB949B4B60812F03516A5BE8AC7207A1341C2D8D2ADE09999164B8341EE9D5BE9A0ACACD7E15FBD0081CECBD0609954B043AC9CD1AB87F4BC80F8CD93680B12512CF4C41F94D744909CE2512F26BEC029E55448553D2254B8D95CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVVt0N+pdRHOZJidfMZYsqks= X-Mailru-Sender: 811C44EDE0507D1FFB106D83BFFB684FFCAFF669A2ABF5350045A77C8BEB847DF16558E9ACA3D3797DE64F860D5175E2645D15D82EE4B272BD6E4642A116CA93524AA66B5ACBE6721EF430B9A63E2A504198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 41/41] ci: introduce the performance workflow X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------woBu5DMwdmA0p0rV89nw9EdR Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Sergey! thanks for the patch! Please see my comments. Sergey On 12/26/25 12:18, Sergey Kaplun wrote: > This patch adds the workflow to run benchmarks from various suites, > aggregate their results, and send statistics to the InfluxDB to be > processed later. > > The workflow contains a matrix to measure GC64 and non-GC64 modes with > enabled/disabled JIT for x64 architecture. > --- > .github/actions/setup-performance/README.md | 10 ++ > .github/actions/setup-performance/action.yml | 18 +++ > .github/workflows/performance.yml | 110 +++++++++++++++++++ > 3 files changed, 138 insertions(+) > create mode 100644 .github/actions/setup-performance/README.md > create mode 100644 .github/actions/setup-performance/action.yml > create mode 100644 .github/workflows/performance.yml > > diff --git a/.github/actions/setup-performance/README.md b/.github/actions/setup-performance/README.md > new file mode 100644 > index 00000000..4c4bbdab > --- /dev/null > +++ b/.github/actions/setup-performance/README.md > @@ -0,0 +1,10 @@ > +# Setup performance > + > +Action setups the performance on Linux runners. > + > +## How to use Github Action from Github workflow > + > +Add the following code to the running steps before LuaJIT configuration: > +``` > +- uses: ./.github/actions/setup-performance > +``` > diff --git a/.github/actions/setup-performance/action.yml b/.github/actions/setup-performance/action.yml > new file mode 100644 > index 00000000..24d07440 > --- /dev/null > +++ b/.github/actions/setup-performance/action.yml > @@ -0,0 +1,18 @@ > +name: Setup performance > +description: The Linux machine setup for running LuaJIT benchmarks > +runs: > + using: composite > + steps: > + - name: Setup CI environment (Linux) > + uses: ./.github/actions/setup-linux > + - name: Install dependencies for the LuaJIT benchmarks > + run: | > + apt -y update > + apt install -y luarocks curl I propose to add util-linux package that provides taskset utility. > + shell: bash > + - name: Install Lua modules > + run: luarocks install lua-cjson > + shell: bash > + - name: Run script to setup Linux environment > + run: sh ./perf/helpers/setup_env.sh > + shell: bash > diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml > new file mode 100644 > index 00000000..fe22eb4b > --- /dev/null > +++ b/.github/workflows/performance.yml > @@ -0,0 +1,110 @@ > +name: Performance > + > +on: > + push: > + branches-ignore: > + - '**-noperf' > + - 'tarantool/release/**' > + - 'upstream-**' > + tags-ignore: > + - '**' > + schedule: > + # Once a day at 03:00 to avoid clashing with runs for the > + # Tarantool benchmarks at midnight. > + - cron: '0 3 * * *' > + > +concurrency: > + # An update of a developer branch cancels the previously > + # scheduled workflow run for this branch. However, the default > + # branch, and long-term branch (tarantool/release/2.11, > + # tarantool/release/2.10, etc) workflow runs are never canceled. > + # do we need this text? > + # We use a trick here: define the concurrency group as 'workflow > + # run ID' + # 'workflow run attempt' because it is a unique > + # combination for any run. So it effectively discards grouping. > + # > + # XXX: we cannot use `github.sha` as a unique identifier because > + # pushing a tag may cancel a run that works on a branch push > + # event. > + group: ${{ startsWith(github.ref, 'refs/heads/tarantool/') > + && format('{0}-{1}', github.run_id, github.run_attempt) > + || format('{0}-{1}', github.workflow, github.ref) }} > + cancel-in-progress: true > + > +jobs: > + performance-luajit: > + # The 'performance' label _must_ be set only for the single > + # runner to guarantee that results are not dependent on the > + # machine. we don't use PR's in LuaJIT > + runs-on: > + - self-hosted > + - Linux > + - x86_64 > + - 'performance' > + > + env: > + PERF_BRANCH: ${{ github.ref_name }} > + PERF_COMMIT: ${{ github.sha }} > + > + strategy: > + fail-fast: false > + matrix: > + GC64: [ON, OFF] > + JOFF: [ON, OFF] > + # Run each job sequentially. > + max-parallel: 1 > + name: > > + LuaJIT > +GC64:${{ matrix.GC64 }} > +JOFF:${{ matrix.JOFF }} > + steps: > + - uses: actions/checkout@v4 > + with: > + fetch-depth: 0 > + submodules: recursive > + - name: setup performance environment > + uses: ./.github/actions/setup-performance > + - name: configure > + # The taskset alone will pin all the process threads > + # into a single (random) isolated CPU, see > + #https://bugzilla.kernel.org/show_bug.cgi?id=116701. > + # The workaround is using realtime scheduler for the > + # isolated task using chrt, e. g.: > + # sudo taskset 0xef chrt 50. > + # But this makes the process use non-standard, real-time > + # round-robin scheduling mechanism. > + run: > > + cmake -S . -B ${{ env.BUILDDIR }} > + -DCMAKE_BUILD_TYPE=RelWithDebInfo > + -DLUAJIT_ENABLE_PERF=ON > + -DLUAJIT_BENCH_INIT="taskset 0xfe chrt 50" > + -DLUAJIT_DISABLE_JIT=${{ matrix.JOFF }} > + -DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }} > + - name: build > + run: cmake --build . --parallel > + working-directory: ${{ env.BUILDDIR }} > + - name: perf > + run: make LuaJIT-perf > + working-directory: ${{ env.BUILDDIR }} > + - name: aggregate benchmark results > + run: make LuaJIT-perf-aggregate > + working-directory: ${{ env.BUILDDIR }} > + - name: send statistics to InfluxDB > + # --silent -o /dev/null: Prevent dumping any reply part > + # in the output in case of an error. > + # --fail: Exit with the 22 error code is status >= 400. > + # --write-out: See the reason for the failure, if any. > + # --retry, --retry-delay: To avoid losing the results of > + # running after such a long job, try to retry sending the > + # results. > + run: > > + curl --request POST > + "${{ secrets.INFLUXDB_URL }}/api/v2/write?org=tarantool&bucket=luajit-performance&precision=s" > + --write-out "%{http_code}" > + --retry 5 > + --retry-delay 5 > + --connect-timeout 120 > + --fail --silent -o /dev/null > + --header "Authorization: Token ${{ secrets.INFLUXDB_TOKEN }}" > + --data-binary @./perf/output/summary.txt > + working-directory: ${{ env.BUILDDIR }} --------------woBu5DMwdmA0p0rV89nw9EdR Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi, Sergey!

thanks for the patch! Please see my comments.

Sergey

On 12/26/25 12:18, Sergey Kaplun wrote:
This patch adds the workflow to run benchmarks from various suites,
aggregate their results, and send statistics to the InfluxDB to be
processed later.

The workflow contains a matrix to measure GC64 and non-GC64 modes with
enabled/disabled JIT for x64 architecture.
---
 .github/actions/setup-performance/README.md  |  10 ++
 .github/actions/setup-performance/action.yml |  18 +++
 .github/workflows/performance.yml            | 110 +++++++++++++++++++
 3 files changed, 138 insertions(+)
 create mode 100644 .github/actions/setup-performance/README.md
 create mode 100644 .github/actions/setup-performance/action.yml
 create mode 100644 .github/workflows/performance.yml

diff --git a/.github/actions/setup-performance/README.md b/.github/actions/setup-performance/README.md
new file mode 100644
index 00000000..4c4bbdab
--- /dev/null
+++ b/.github/actions/setup-performance/README.md
@@ -0,0 +1,10 @@
+# Setup performance
+
+Action setups the performance on Linux runners.
+
+## How to use Github Action from Github workflow
+
+Add the following code to the running steps before LuaJIT configuration:
+```
+- uses: ./.github/actions/setup-performance
+```
diff --git a/.github/actions/setup-performance/action.yml b/.github/actions/setup-performance/action.yml
new file mode 100644
index 00000000..24d07440
--- /dev/null
+++ b/.github/actions/setup-performance/action.yml
@@ -0,0 +1,18 @@
+name: Setup performance
+description: The Linux machine setup for running LuaJIT benchmarks
+runs:
+  using: composite
+  steps:
+    - name: Setup CI environment (Linux)
+      uses: ./.github/actions/setup-linux
+    - name: Install dependencies for the LuaJIT benchmarks
+      run: |
+        apt -y update
+        apt install -y luarocks curl
I propose to add util-linux package that provides taskset utility.
+      shell: bash
+    - name: Install Lua modules
+      run: luarocks install lua-cjson
+      shell: bash
+    - name: Run script to setup Linux environment
+      run: sh ./perf/helpers/setup_env.sh
+      shell: bash
diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml
new file mode 100644
index 00000000..fe22eb4b
--- /dev/null
+++ b/.github/workflows/performance.yml
@@ -0,0 +1,110 @@
+name: Performance
+
+on:
+  push:
+    branches-ignore:
+      - '**-noperf'
+      - 'tarantool/release/**'
+      - 'upstream-**'
+    tags-ignore:
+      - '**'
+  schedule:
+    # Once a day at 03:00 to avoid clashing with runs for the
+    # Tarantool benchmarks at midnight.
+    - cron: '0 3 * * *'
+
+concurrency:
+  # An update of a developer branch cancels the previously
+  # scheduled workflow run for this branch. However, the default
+  # branch, and long-term branch (tarantool/release/2.11,
+  # tarantool/release/2.10, etc) workflow runs are never canceled.
+  #
do we need this text?
+  # We use a trick here: define the concurrency group as 'workflow
+  # run ID' + # 'workflow run attempt' because it is a unique
+  # combination for any run. So it effectively discards grouping.
+  #
+  # XXX: we cannot use `github.sha` as a unique identifier because
+  # pushing a tag may cancel a run that works on a branch push
+  # event.
+  group: ${{ startsWith(github.ref, 'refs/heads/tarantool/')
+    && format('{0}-{1}', github.run_id, github.run_attempt)
+    || format('{0}-{1}', github.workflow, github.ref) }}
+  cancel-in-progress: true
+
+jobs:
+  performance-luajit:
+    # The 'performance' label _must_ be set only for the single
+    # runner to guarantee that results are not dependent on the
+    # machine.
we don't use PR's in LuaJIT
+    runs-on:
+      - self-hosted
+      - Linux
+      - x86_64
+      - 'performance'
+
+    env:
+      PERF_BRANCH: ${{ github.ref_name }}
+      PERF_COMMIT: ${{ github.sha }}
+
+    strategy:
+      fail-fast: false
+      matrix:
+        GC64: [ON, OFF]
+        JOFF: [ON, OFF]
+      # Run each job sequentially.
+      max-parallel: 1
+    name: >
+      LuaJIT
+      GC64:${{ matrix.GC64 }}
+      JOFF:${{ matrix.JOFF }}
+    steps:
+      - uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+          submodules: recursive
+      - name: setup performance environment
+        uses: ./.github/actions/setup-performance
+      - name: configure
+        # The taskset alone will pin all the process threads
+        # into a single (random) isolated CPU, see
+        # https://bugzilla.kernel.org/show_bug.cgi?id=116701.
+        # The workaround is using realtime scheduler for the
+        # isolated task using chrt, e. g.:
+        # sudo taskset 0xef chrt 50.
+        # But this makes the process use non-standard, real-time
+        # round-robin scheduling mechanism.
+        run: >
+          cmake -S . -B ${{ env.BUILDDIR }}
+          -DCMAKE_BUILD_TYPE=RelWithDebInfo
+          -DLUAJIT_ENABLE_PERF=ON
+          -DLUAJIT_BENCH_INIT="taskset 0xfe chrt 50"
+          -DLUAJIT_DISABLE_JIT=${{ matrix.JOFF }}
+          -DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }}
+      - name: build
+        run: cmake --build . --parallel
+        working-directory: ${{ env.BUILDDIR }}
+      - name: perf
+        run: make LuaJIT-perf
+        working-directory: ${{ env.BUILDDIR }}
+      - name: aggregate benchmark results
+        run: make LuaJIT-perf-aggregate
+        working-directory: ${{ env.BUILDDIR }}
+      - name: send statistics to InfluxDB
+        # --silent -o /dev/null: Prevent dumping any reply part
+        # in the output in case of an error.
+        # --fail: Exit with the 22 error code is status >= 400.
+        # --write-out: See the reason for the failure, if any.
+        # --retry, --retry-delay: To avoid losing the results of
+        # running after such a long job, try to retry sending the
+        # results.
+        run: >
+          curl --request POST
+          "${{ secrets.INFLUXDB_URL }}/api/v2/write?org=tarantool&bucket=luajit-performance&precision=s"
+          --write-out "%{http_code}"
+          --retry 5
+          --retry-delay 5
+          --connect-timeout 120
+          --fail --silent -o /dev/null
+          --header "Authorization: Token ${{ secrets.INFLUXDB_TOKEN }}"
+          --data-binary @./perf/output/summary.txt
+        working-directory: ${{ env.BUILDDIR }}
--------------woBu5DMwdmA0p0rV89nw9EdR--