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 7CF7B16C8493; Fri, 26 Dec 2025 12:38:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7CF7B16C8493 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1766741936; bh=ezlJiUGrV+hV16dUA+q3zkK+Q0HSRUM472/KfaYuY8s=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=MlZgrjeKWHpvO1ylvcYzCxwt0snLJAWrqSz7aabZWo6C+M3MAnd6qeCo3BjVu33AE gXCw25kx8bhGRIohd5IjWRcJLtPkGja3bKxEQdrlt7wQC8lmK28tQ9qF7IfcqZVP3p rPbxjlk5MEK57jEqwTY6GYPDmu7aLz5JrgOuxudg= 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 5A89316AFFC7 for ; Fri, 26 Dec 2025 12:21:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5A89316AFFC7 Received: by exim-smtp-7b4fb89df9-lft7n with esmtpa (envelope-from ) id 1vZ40v-000000008Cp-1Ucf; Fri, 26 Dec 2025 12:21:37 +0300 To: Sergey Bronnikov Date: Fri, 26 Dec 2025 12:18:12 +0300 Message-ID: <4d59c0371b1577651d63fdaef05b2e6c66d6464c.1766738771.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD979975AF0D777FEBD9A7AA89612843F49E05A58644225EC05182A05F5380850402E6F0BD520E6BAAA3DE06ABAFEAF6705FD5CF9F811563D08B4FA2C6BBBE99EF9CF784B0C616BB7A4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE72E4E5201E1C2E308EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566657B88B02DF8C8691BDC21AE2FC0FE658EDCD39A7D089D1A3C09684213CEAF42389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A3E989B1926288338941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B652D31B9D28593E51CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE76515C59FC18CEA6D731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5F53DE9A740DADA4C5002B1117B3ED6969850F6DCB4B33ABC3D2BBC1EF78EDEBE823CB91A9FED034534781492E4B8EEADA7D01B58E6BF979CC79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE191716CD42B3DD1D34CAB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D6597F19BF347685CD39BD13D3AEC731DCAEFD98D8023F34D78E430193A3D5A408F4FC2D60277CC78AA9B8341EE9D5BE9A0ACD1FD21DCEA10ED905D8439B09F6DFF07D2BFA6FC21688536536EB022892E5344C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVdtTL5f5BIXbECvbnCQxdJY= X-DA7885C5: EC8DA24F21F58F06F255D290C0D534F9479277C24E844F78AFB0A1BC8D594B834BE3A54138E67D035B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393DDD5FD59B456EAD2FF465F5E3A8C46AA8700636FE984EBB8061D611F2167EFD9E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: [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 Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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 + 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. + # + # 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. + 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 }} -- 2.52.0