Check out our Monthly Survey Page to see what our users are running.
We do often include affiliate links to earn us some pennies. See more here.
Note: This guide will continue to be updated based on feedback from everyone. This isn't an attempt to better anyone else's method, but simply give a step-by-step guide for anyone interested.

Last updated: 16/06/2016 17:44 UTC.

For those of you who aren't sure how to benchmark Dota 2 on Linux, here's a small guide. It frustrated me there wasn't one, so after getting help I'm sharing it with you all. One thing a lot of websites miss when doing benchmarks, is easily detailing how others can do their own.

With thanks to people in the GOL IRC and @PimpmuckL on twitter and everyone commenting with improvements.

Benchmarking isn't usually my thing and after doing more I will totally back Phoronix here, it is very time consuming. Hopefully with this guide not only will I remember and have less headaches, but so will you.

Note: Remember every demo file will give you different scores. Even with the same hardware your scores can still differ from someone else. No single demo file is "the best" to use.

You can do it three possible ways, you can run it inside Dota 2 directly, you can use the Steam Launch options or use a simple benchmarking script. A fourth way is to run it in terminal using the full launch command, but it's better to use a script than do that.

Important: Graphical settings can change between API and Resolution adjustments, make sure they are 100% the same. Pay close attention to the advanced options in Dota 2. The "-autoconfig_level 3" setting is to ensure it runs at the Best Looking setting each time.

You can find a full list of Dota 2 commands here. You can also find other launch options here.

I decided to leave the sound on, since it's part of the game it will give a more accurate score overall rather than turning it off. You play games with sound on (usually right?) so why benchmark without sound. I understand there could be audio pipeline issues, but I feel having the sound on makes it more accurate for what you can actually expect to achieve in-game yourself. If you do want to remove the sound, you can use "-nosound".

Getting a demo file
If you want to benchmark against what Phoronix uses, then you need this demo file.

Download it and move it into the Dota 2 content folder. Find where Dota 2 is installed and place it in the main data folder (this should be the default location):
/.local/share/Steam/steamapps/common/dota 2 beta/game/dota

There are others you can use, like the ones Valve suggested Phoronix to use to re-do his initial benchmarks which were incorrect. Otherwise, you can use this file.

Testing inside Dota 2 directly
First you need to enable the in-game console and pick a graphics API. You do this by setting launch options for Dota 2. Right click on Dota 2 in Steam, click properties, set launch options to get a screen like this:
image

For Vulkan:
+con_enable 1 -vulkan +fps_max 0 -autoconfig_level 3 -high
Note: "-console" also works in place of "+con_enable 1". They just behave differently, but it won't affect scores.

For OpenGL
+con_enable 1 -gl +fps_max 0 -autoconfig_level 3 -high

Note: If you want to compare against Phoronix scores, you need to add in "+timedemo_start 50000 +timedemo_end 51000"

Then you can load Dota 2, press the "\" key to get the console open and run a command like this:
timedemo *demo-file-name*

Run the test directly from Dota 2 launch options
You can also run the entire test directly from the launch options (like above) using a command like the below. I find this way to be slower, but it's here for referencing if needed. This will then run the demo as soon as you play Dota 2.

Note: If you want to compare against Phoronix scores, you need to add in "+timedemo_start 50000 +timedemo_end 51000"

For Vulkan
-vulkan +timedemo *demo-file-name* +fps_max 0 -novconsole -autoconfig_level 3 -high

For OpenGL:
-gl +timedemo *demo-file-name* +fps_max 0 -novconsole -autoconfig_level 3 -high

Using a benchmark script
You can save this to a text file, make it executable and run it to do a benchmark.

Note: If you want to compare against Phoronix scores, you need to add in "+timedemo_start 50000 +timedemo_end 51000"

#!/bin/sh

DEMOFILE=*demo-file-name*

WIDTH=1920
HEIGHT=1080

# -vulkan or -gl
API="-vulkan"

# this should be the default install folder, change it if yours is different (only needed to renaming the benchmark file)
DOTA2="$HOME/.local/share/Steam/steamapps/common/dota 2 beta/game"

# rename any existing benchmark scores
cd "$DOTA2"
mv -f "$DOTA2/dota/Source2Bench.csv" "$DOTA2/dota/Source2Bench.csv.1"

# launch steam and dota2 with benchmark mode and the "benchvulkan2" demo file
steam -applaunch 570 $API +timedemo $DEMOFILE +demo_quitafterplayback 1 +fps_max 0 -autoconfig_level 3 -h $HEIGHT -w $WIDTH -fullscreen -high

Ideally I want to get this to run x amount of times based on a setting, but haven't figured that part out yet.

The results file
The results will be stored in "Source2Bench.csv" inside the main Dota 2 folder. If you run it multiple times, it will keep adding into this file. I suggest you cut the file and paste it somewhere else after testing each API and again for resolutions. Using a fresh file for each so you don't mix any results up (which is very important of course).

The results file will resemble this:
image
FPS = average
FPS minus FPS Variability = Minimum FPS

On the right of the document, you will also see a jumble of different tests together like this:
Quotebenchvulkan2.dem,UNKNOWN, 71.7, 4.2

First number is the average FPS, second is the variance to do the minimum FPS calculation.

Hopefully you found this all helpful.

If you would like to see more guides, tell me what and I will see what I can figure out for you. Article taken from GamingOnLinux.com.
Tags: Benchmark, HOWTO
0 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly.
See more from me
The comments on this article are closed.
35 comments
Page: «4/4
  Go to:

Liam Dawe Jun 16, 2016
Guide updated, as requested (and it does make some sense) the first demo linked to is the current one Phoronix is using.

All code bits and the script code are updated to reflect you need to change the demo file name yourself.
Liam Dawe Jun 16, 2016
Quoting: Xpander
Quoting: liamdawe
Quoting: Xpanderi just cant make the benchmark work.. using the script, no errors in terminal, all launches fine but game is just waiting in the main menu and doing nothing.

adding all this crap into launch options - game is waiting in the main menu doing nothing

adding -console or +con_enable 1 - makes the game go to main menu but i cant find the key to bring up the console, tried like all the keys on my keyboard

What exact folder is your demo file in?

What keyboard layout do you have?

ok the benchmark.dem file had to be in

/.local/share/Steam/steamapps/common/dota 2 beta/game/dota

not in

/.local/share/Steam/steamapps/common/dota 2 beta/game
Yep, correct. Not sure why I missed the "dota" on the end must have been a copy paste fail somewhere for me, guide updated.
Xpander Jun 16, 2016
ok seems CPU bottlenecked for me.

GPU usage was 55-65% only

CPU usage 30-34%

AMD FX 8320@4,4Ghz, 16GB DDR3, GTX 970 with 367.27



fps: 79.6
fps variability: 15.2


ran phoronix-test-suite also

http://openbenchmarking.org/result/1606165-HA-DOTA2BENC11

and who wants to run against it:

phoronix-test-suite benchmark 1606165-HA-DOTA2BENC11


Last edited by Xpander on 16 June 2016 at 6:07 pm UTC
Liam Dawe Jun 28, 2016
Quoting: GuestTo repeat the test several times in the script, you can do:
#!/bin/bash
count=3
while ((count>0)); do
  ((count--))
  your command here
done

That’s for bash so you’d have to replace #!/bin/sh with #!/bin/bash.
If you prefer to keep sh, you can use:
#!/bin/sh
count=3
while [ $count -gt 0 ]; do
count=`expr $count - 1`
your command here
done


Edit: fixed typo, a closing parenthesis was missing in the bash code.

The problem with this, is that it will just keep running it, it need to have a check to see if the app is running or not before it tries to re-launch it.
tuubi Dec 9, 2016
View PC info
  • Supporter Plus
Quoting: GuestHow do I edit the command line so the benchmark starts at 23:45 and ends at 24:45 of that demo file ? Similar to this "+timedemo_start 50000 +timedemo_end 51000". I don't know what 50,000 / 51,000 stands for.
They're "ticks" as defined by the engine. Seems like the default in Dota 2 might be somewhere around 30 per second. Seems like you could use the option "engine_show_frame_ticks" to find good start and end values. Here's a list of console commands if you need it.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.
Buy Games
Buy games with our affiliate / partner links: