Benchymark - a native Saifish OS benchmark tool featuring 3DBenchy

Hey everyone!

Today i worked on porting Benchymark, a benchmark app for SailfishOS, and up front again: it was written using LLM, with me desiging the stages and weigh them for the C2, deciding what the app does and how it looks and feels.

Update: 2.2 is the current version and there is a website to track the results.

tl;dr: tick the stages you want, tap Start, get a table of frames per second and system values that you can screenshot and post. 14 stages, from a rotating 3DBenchy wireframe to a prime spiral that counts on all your cores.

Here is a video showing the C2 and the Tablet in the backgound.

Some history, because this one is personal. In 2018 someone asked on TMO for a benchmark app for Sailfish, because there was none. I answered with the shell commands i had used to compare the Jolla C, Jolla Phone, Nexus 5 and the tablet in 2016, and wrote that “some common linux commands could indeed be utilized by an application and have a nice front end”. Eight years later, here is that front end xD

It started as Benchymark for AsteroidOS watches, which i made to see what our watches are actually good and bad at. But mostly to diagnose which qml patterns to avoid. At some point it became a drain test app for the watches to test the impact of kernel parameter changes. For the phone it got a proper SailfishOS start page and heavier loads, because a phone laughs at watch loads obviousy.

And why a boat?
3DBenchy is the little tugboat everyone prints to benchmark a 3D printer. Over in AsteroidOS we print docks for our watches on those printers rather frequently, and here we (will) print parts for the Jolla Phone 2 and way back in the time the great TOHs for the JP-1. So the boat that tests the printer, that prints the parts for the phones, now tests the phone. And it really draws it: SailfishOS has no 3D engine (of that i know) on board for this, so the app rotates the mesh and projects every line itself, every frame. Your phone draws the object that tested the printer that made its parts, so t say.

The graphics stages, 10 seconds each, on black so your ambience does not change the result:

  • Benchy light, Benchy heavy and Benchy glow: the 3DBenchy as a wireframe, from two boats to 120 per frame, and one with a blurred glow
  • Shader light and Shader heavy: noise fields computed for every pixel, the heavy one is brutal
  • Overdraw, Cascade and Icon storm: fill rate, many moving items, many small images
  • Text scale and Text reraster: the same picture made two ways, which shows what animating text size really costs

The system stages, my 2016 console tests rebuilt inside the app, because the sandbox does not run sysbench or dd:

  • CPU prime: sysbench’s cpu test on all cores, and every finished count lights up a cell of an Ulam spiral if its number is prime. The diagonals appear while you watch.
  • Memory throughput, One million (JavaScript counting) and Storage performance (256 MB written and read past the cache)

Storage is off by default, it writes 256 MB to your flash every run. Tap any stage name on the start page and it tells you in one sentence what it tests.

At the end you get one screen with your device, SailfishOS version, resolution, GPU and all results. That is the one to post here, i would love to see what your devices do. My C2 for a start:

And the good old Jolla Tablet ran it too, the x86 build. It is a fun comparison: three times the pixels of the C2 make the shader stages crawl (Shader heavy 2 fps against 7), and its four Atom cores manage 1271 prime events per second against the C2’s 9719. But its memory and storage are faster than the C2’s, 991 against 650 MB/s and 42/32 against 27/24 MB/s for storage read and write. Not bad for 2015 hardware :smiley:

Run in loop repeats the whole sequence until you tap, if you want to see how your phone holds up when it gets warm.

The numbers are not comparable with the watch version or with my 2016 numbers, different loads and with drawing going on alongside. They are comparable between phones running this version, that is the point.

RPMs for 64 bit ARM, 32 bit ARM and x86, SailfishOS 4.5 and newer:

It goes to Chum next (Once i get an account to OBS). Source and the full description of every stage:

Have fun,
mosen / moWerk

nice to see a native benchmark app on SFOS, worked well on JP25 and Xperia 10 II..my results:

A few other benchmarks that could be added:

CPU multi-threaded

Vulkan

Hardware video decoding

Thermal test 

Battery drain

An option to save test results would also be a great addition

Thanks for the fast test and reply and the first two results, especially from the new Jolla Phone. Both are now in the README, with your name credited.

  • The CPU Prime test already uses all cores, so i added a single core test for comparison.
  • Hardware decoding is awkward to measure from a sandbox and vulkan is a bit too much work to get done.
  • But the Thermal test is easy to do. Benchymark now shows the temperature curve over the run. and for longer thermal build up just loop the tests.
  • Saving now works via the sailfish share function. The JSON of the last run is also in ~/.local/share/net.mowerk/harbour-benchymark/.
    We can share the json that was generated on last run and the end screen using the sfos share function

Battery drain test however is a whole other app imo. Its an additional UI path with some kind of persitent mechanic and i want to keep the current “select stages and run” flow intact without adding more clutter.

1.1.0 is released:

Thanks to input from @Mister_Magister asking for kernel version displayon telegram and implicitly inspiring more dev centric features, 1.2 now has:

  • Run one hour: a third run mode next to Run once and Run in loop. It loops the stages and stops at exactly 1:00:00, so battery and temperature tests compare between phones. Small hint under the toggle says which mode is for what.
  • Battery curve: charge in % and the power draw in watts over the whole run, with average W, Wh used, %/h and the brightness you ran it at (that one matters most for drain).
  • Clocks curve: CPU and GPU clock in % of their max, red where the kernel throttles. Now you can see if your phone slows down when it gets hot.
  • Kernel version and the exact runtime in the results header.

Share JSON carries all the curves too, if you want to dig into the numbers.

RPMs for aarch64, armv7hl and i486:

I can see that you are using a UBO in GLSL (because of JollaPhone2026) but could you make an SSBO version for Sony devices to see if there is the difference in performance?

good idea, but our shaders actually don’t use a UBO, they are plain GLSL ES 1.00 uniforms through Qt’s ShaderEffect, only 2 to 5 values per frame, so the buffer type would not show up in them.
What would show a difference is a stage that reads a big table per pixel, once from a UBO, once from an SSBO and once from a texture. I’ll look into that for 1.3, first step is showing the GL version in the results so we know which devices can do SSBOs at all (needs ES 3.1). Thanks for the idea!

Benchymark 2.0 is out! i skipped posting 1.3, so here is everything since 1.2 in one go.

The big one: scores that compare between devices. @Mister_Magister ran it on his Xiaomi Pad 6 and asked the right question: do phones with more pixels get more work? Yes they did, and fast phones just sat at their 60/90/120 Hz and told nothing. So in 2.0:

  • every device renders the same 720×1600 pixels (in its own screen shape) and scales up
  • each stage ramps its load on the first run until it drops under 25 fps, and remembers it, so later runs take the usual 10 seconds per stage
  • the result is a score, work per second: boats/s, Mpx/s, layers/s and so on, instead of fps

So your old 1.x numbers don’t compare with 2.0 anymore, sorry, please run again.

For @kan_ibal: three table stages, UBO, SSBO and texture. Every pixel walks a 16 KB table, each read depends on the one before, only where the table lives changes. And every GPU does its own thing:

  • Jolla C2 (Mali): UBO 335, SSBO 335, texture 623 M reads/s
  • Xperia XA2 (Adreno 508): 457, 442, 461, all even
  • Jolla Tablet (Intel): UBO 112, texture 76, no SSBO (it only has OpenGL ES 3.0)

Really curious what the newer Adrenos and the Jolla Phone say!

Feels more like a Sailfish app now:

  • pulley menus instead of buttons, with Select all / Deselect all on the start page, finally no more unticking all the switches to run one stage
  • a settings page: hints on or off, and which system details show in the results, so you decide how cluttered your results page looks.
  • Share image now saves the whole results page as one long picture, all rows and graphs
  • the header shows kernel, device, OS, GPU, OpenGL version each on its own line, thanks Keijø on Telegram for reading the OS version as the kernel version, fair point xD

And some fixes from my old XA2 with a smashed screen: on old Qualcomm kernels the temperature showed 0.4 °C and everything counted as throttled, both fixed. The Jolla Tablet now has its CPU curve too.

Known issue: on the Jolla Tablet, Share image gives an empty picture, Share JSON works.

RPMs for aarch64, armv7hl and i486:

here is my JP26 benchmark with the new 2.0 :


(I was testing with the silicon case on which might affect little bit those temp numbers…at least)

here, is also my Xperia 10 II:

also when the benchmark is done, maybe the share image option should be just save image instead?

HA, interesting. Thanks again for the quick share.
I see there is no GPU graph drawn. thats due to the app only takeing an entry from /sys/class/devfreq/ whose name contains “gpu”, “mali” or “kgsl”.

If you are in for some fun, this chained command might reveal the path on the JP26. It can be copied as on line and be run as user.

ls -l /sys/class/devfreq/; for d in /sys/class/devfreq/*; do echo "$d cur=$(cat $d/cur_freq 2>&1) max=$(cat $d/max_freq 2>&1)"; done; ls -d /sys/devices/platform/*mali* /sys/devices/platform/*gpu* /sys/class/misc/mali* /sys/kernel/ged/hal/* /proc/gpufreq* /proc/mali* 2>/dev/null

The command does three things:

  1. Lists the GPU clock folders. The arrows in the listing show which device each entry belongs to, so we see its real name even if it is only a number.
  2. Reads the current and maximum clock of each one. If the GPU clock exists but the user can’t read it, the output says “Permission denied”. That explains a missing curve just as well as a missing file.
  3. Looks in other common places. MediaTek kernels often report the GPU clock outside the usual folder, in their own driver files (/sys/kernel/ged, /proc/gpufreq). That’s from memory, not checked on this phone.

here is the output: openSUSE Paste

The GPU clock is in the MediaTek own driver files, as guessed. /sys/kernel/ged/hal/current_freqency (MediaTek’s spelling) is the one we want. /proc/gpufreqv2 probably has the maximum and the list of clock steps.

To adapt the calls in benchymark we would need to know the format of the value in there:

cd /sys/kernel/ged/hal; for f in current_freqency custom_upbound_gpu_freq total_gpu_freq_level_count gpu_utilization; do echo "== $f"; cat $f 2>&1; done; echo "== v_table"; head -5 v_table 2>&1; echo "== gpufreqv2"; ls /proc/gpufreqv2 2>&1; head -20 /proc/gpufreqv2/gpufreq_status 2>&1

reads the current clock, the highest allowed clock, the number of clock steps, the GPU load, the first lines of the clock table, and the status file in /proc/gpufreqv2. The status file name is a guess.

here is the output: openSUSE Paste

Here is a special JP26 fix up pre-release for you to approve for release when found working :smiley:

nothing changed:

also when the benchmark is finished, maybe it should save instead of share the json/image files?

Pipa has Snapdragon 870

JP26 has Mediatek Dimensity 7100

JP26 should be obliterated

Until that does not happen, the results cannot be trusted between devices

Also nobody can beat me in kernel version, not even my desktop computer

Also this 2014 phone just obliterated Snapdragon 870, if that doesn’t make any sense to you, Good. It shouldn’t.

Yes! very cool to have you here with more devices. 1137 boats/s means about 57 fps at the default load (20). Benchy light locked in its lightest load when the first second stuttered, fixed now.
Sooo, Benchymark 2.1.0 is out!
Also every run is saved now with the timestamp and shown in a new settings tab, thanks again @ahjolinna for asking!

EDIT, for the missing GPU graph, there is now debug info thrown to the json so that would be valuable to share after a fresh run.

there is a bug with removing old results entries, it removes the ones made before v2.1.0 but not the result I made with 2.1.0 even thought I removed the screenshot manually but I didnt find json files at `~/.local/share/ …I didnt even find a app folder (I was thinking maybe those json results should be saved at documents folder?)

thanks, found it: deleting worked, but with an empty list the app took the last run back in at the next start. fixed in the next release. the runs are in ~/.local/share/net.mowerk/harbour-benchymark/runs/, a hidden folder, so the file manager needs hidden files switched on.

oh, I was searching for ~/.local/share/benchymark or harbour-benchymark folder