You can sign up to get a daily email of our articles, see the Mailing List page!
Support us on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! Alternatively, you can support us on Paypal and Liberapay!

Want to benchmark Dota 2 on Linux? Here's how to do it

Posted by , / 16407 views
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.
0 Likes
Comments
Page: 1/4»
  Go to:

Comments on this article are now closed.
coruun 16 June 2016 at 10:00 am UTC
Why don't you run Dota2 directly via terminal as it was mentioned by dang_valve?
liamdawe 16 June 2016 at 10:07 am UTC
coruunWhy don't you run Dota2 directly via terminal as it was mentioned by dang_valve?
That is not a direct terminal command, "dota2" is not a command by itself unless you specifically set something up to be called when you run "dota2". I imagine he has his own set of stuff for that.

That is what the script at the end of the guide is for. Not only that, but the other mentioned reasons (like checking graphical settings and so on). I do explain everything in the guide.


Last edited by liamdawe at 16 June 2016 at 10:07 am UTC
dmantione 16 June 2016 at 10:34 am UTC
Any chance sometime can run "perf top" while the benchmark is running. It would be good to get an idea what the cpu is doing while running it. Knowing if drivers, kernel or game code itself is the bottleneck would be great info to see what performance potential there is.

I don't have Vulkan capable hardware myself, otherwise I would test myself.
fabry92 16 June 2016 at 10:56 am UTC
console give me this error >.<
timedemo benchvulkan2
CDemoFile:: Open: couldn't open file benchvulkan2.dem for reading.
ReadDemoHeader: invalid pBuffer.
benchvulkan2.dem: unable to extract addons from file


Last edited by fabry92 at 16 June 2016 at 10:57 am UTC
Fenix2412 16 June 2016 at 10:59 am UTC
well wanted to try it but my game says that it can't open the file because it's damaged...
liamdawe 16 June 2016 at 11:13 am UTC
The demo file needs to be in the main dota folder, not the replays folder which is where the error comes from.
fabry92console give me this error >.<
timedemo benchvulkan2
CDemoFile:: Open: couldn't open file benchvulkan2.dem for reading.
ReadDemoHeader: invalid pBuffer.
benchvulkan2.dem: unable to extract addons from file
Fenix2412 16 June 2016 at 11:20 am UTC
it is in ~/.steam/steamapps/common/dota 2 beta/game/
Nyamiou 16 June 2016 at 11:24 am UTC
Phoronix tests have "-autoconfig_level 3" in the command line as recommended by Valve (see here) to have best looking settings every time.

Full Phoronix test config for Dota 2 is here :
https://openbenchmarking.org/innhold/6787c1cbb500e92a0b1e72fee354b026f6b29981


Last edited by Nyamiou at 16 June 2016 at 11:29 am UTC
fabry92 16 June 2016 at 11:25 am UTC
Demofile: benchvulkan2.dem Frame data csv: Unknown Fps: 102.7 Fps variability 19.6 Total sec 37.0 Width 1920 x 1080 Numframes: 3794 Dxlevel 110 Backbuffer: RGBA8888 OS: Ubuntu 16.04 Gtx: nvidia 780

I don't like this bench XD For now it's not a game for test vulkan i think. In game i stay always at 120 fps without any problems honestly. Edit: without cap i stay on 140 fps


Last edited by fabry92 at 16 June 2016 at 11:36 am UTC
liamdawe 16 June 2016 at 11:30 am UTC
NyamiouPhoronix tests have "-autoconfig_level 3" in the command line as recommended by Valve (see here) to have best looking settings every time.
Phoronix is not using it:
https://openbenchmarking.org/innhold/78bee2634b4c092f4978d416ccf6887ddbd1d86e

Unless he has another Dota 2 test I am not aware of.


Edit: Okay so his new test does: https://openbenchmarking.org/innhold/6787c1cbb500e92a0b1e72fee354b026f6b29981

It would be nice if his site told you a newer build of a benchmark is available.


Last edited by liamdawe at 16 June 2016 at 11:44 am UTC
  Go to:
While you're here, please consider supporting GamingOnLinux on Patreon or Liberapay. We have no adverts, no paywalls, no timed exclusive articles. Just good, fresh content. Without your continued support, we simply could not continue!

We also accept Paypal donations and subscriptions! If you already are, thank you!
Livestreams & Videos
Community Livestreams
  • GOG Guest Stream: Resonance
  • Date:
See more!
Popular this week
View by Category
Contact
Latest Forum Posts
Facebook