Bug 251324

Summary: benchmarks/wrk: Add support for ARM64
Product: Ports & Packages Reporter: Oleksandr Tymoshenko <gonzo>
Component: Individual Port(s)Assignee: Sergey A. Osokin <osa>
Status: Closed FIXED    
Severity: Affects Only Me CC: dch, diizzy, emaste
Priority: --- Flags: bugzilla: maintainer-feedback? (osa)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
wrk-aarch64-fix.patch
none
include 4.2.0 update while we're here none

Description Oleksandr Tymoshenko freebsd_committer freebsd_triage 2020-11-23 07:24:34 UTC
Created attachment 219900 [details]
wrk-aarch64-fix.patch

lang/luajit-openresty builds on ARM64 and wrk, whn built with it, runs just fine. Attached patch switches the dependency to luajit-openresty for aarch64.
Comment 1 Sergey A. Osokin freebsd_committer freebsd_triage 2020-11-23 16:28:25 UTC
Hi Oleksandr,

thanks for the report and the patch.

In case it isn't break any functionality it's probably better to completely switch to lang/luajit-openresty.
Comment 2 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2020-12-04 21:20:04 UTC
Functionality-wise it's the same, I ran my lua scripts using both implementations. openresty version seems a bit slower on the same machine:
my scenario pre-generates a bunch of random numbers (offsets) for every worker thread and it takes visibly longer for openresty version: ~5sec vs ~25sec. I'd consider it a regression on x86, but for arm64 functional (if a bit slow app) is better than no app.

Just out of curiosity I tried to isolate the logic from the script in an isolated benchmark and both LuaJIT implementations showed the same result. So it's probably multi-threaded code that causes a slow-down.
Comment 3 Daniel Engberg freebsd_committer freebsd_triage 2022-08-09 07:28:38 UTC
Ping, status on this one?
Comment 4 Sergey A. Osokin freebsd_committer freebsd_triage 2022-08-09 14:09:27 UTC
(In reply to Daniel Engberg from comment #3)

The status is good.

My suggestion is to implement three FLAVORs of this port:
- depends on lang/luajit
- depends on lang/luajit-openresty
- depends on lang/luajit-devel
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2022-08-09 16:10:48 UTC
Wouldn't it be easier to use a menu to select what lib you want to use?

While it's out of scope for this PR I think we should decide of one flavour (most distros seems to use -openresty and it also has best compatibility between archs) to use instead of having to shuffle between three different libraries.
Comment 6 Sergey A. Osokin freebsd_committer freebsd_triage 2022-08-09 19:35:36 UTC
(In reply to Daniel Engberg from comment #5)

A menu adds a value for interactive work, when FLAVORs help to generate packages based on different dependencies.

In case of the patch - that can be done in one if statement, so an additional work is required.
Comment 7 Dave Cottlehuber freebsd_committer freebsd_triage 2022-09-02 10:45:03 UTC
Created attachment 236308 [details]
include 4.2.0 update while we're here
Comment 8 Dave Cottlehuber freebsd_committer freebsd_triage 2022-09-02 10:45:30 UTC
FWIW the flavors are really useful. I can finally have neovim + wrk on all my systems :-). while we're here, wrk 4.2.0 works just fine.
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-09-04 14:22:23 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6b9920883dc98e69f450c84701ad4eab8e90ddac

commit 6b9920883dc98e69f450c84701ad4eab8e90ddac
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2022-09-04 14:20:51 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2022-09-04 14:21:50 +0000

    benchmarks/wrk: update to 4.2.0

    ChangeLog:      https://github.com/wg/wrk/compare/4.1.0...4.2.0
    PR:             251324

 benchmarks/wrk/Makefile | 3 +--
 benchmarks/wrk/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 5 deletions(-)
Comment 10 Sergey A. Osokin freebsd_committer freebsd_triage 2022-09-04 14:23:06 UTC
Updated to 4.2.0, thank you.