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.

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

By - | Views: 44,294
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. Find me on Mastodon.
See more from me
The comments on this article are closed.
35 comments
Page: «2/4»
  Go to:

Liam Dawe Jun 16, 2016
Guide updated.
Guest Jun 16, 2016
Thanks for putting this guide together Liam, it must of taken some arsing around to get it all exacting and write it up.

appreciated.


Last edited by on 16 June 2016 at 12:01 pm UTC
Liam Dawe Jun 16, 2016
Guide updated for some more explanations.


Last edited by Liam Dawe on 16 June 2016 at 12:05 pm UTC
Trollwut Jun 16, 2016
TBH I don't care how to do a benchmark in Dota 2, as I won't do one myself.

But I really love how you give insight to your work. This is important in this case, as when someone blames Vulcan for being lame, in your case you can exclude several bottlenecks or wrong configs.

Keep up the work, mate!
dubigrasu Jun 16, 2016
Well, I believe that one thing we should do for obtaining meaningful easily comparable results is to use the same demo file as a kind of standard.
Any demo file should do, but personally I think that the one Michael is using is more suited to the job. He's doing frequent benchmarks with high coverage (you might want to compare with) and the file he's using can be easily found on the Dota 2 test profile: http://openbenchmarking.org/ > Tests > Dota 2 > Revision history > latest release.
It is also the same file that Vulkan Source2 developers from Valve are recommending for testing, so it makes sense for me to use it as reference.
Liam Dawe Jun 16, 2016
Quoting: dubigrasuWell, I believe that one thing we should do for obtaining meaningful easily comparable results is to use the same demo file as a kind of standard.
Any demo file should do, but personally I think that the one Michael is using is more suited to the job. He's doing frequent benchmarks with high coverage (you might want to compare with) and the file he's using can be easily found on the Dota 2 test profile: http://openbenchmarking.org/ > Tests > Dota 2 > Revision history > latest release.
It is also the same file that Vulkan Source2 developers from Valve are recommending for testing, so it makes sense for me to use it as reference.
This is just a guide, people are free to use whatever demo file they choose.

Didn't know about the revision history, still should be listed on the page directly if one is out of date IMO.

As for Valve using the PTS demo, got a source for that, I would be more willing to use it if that is confirmed.

Sidenote: I appreciate the work Phoronix puts in, but I would rather not emulate eveything he does. This site exists for the very reason of doing our own thing. I prefer an independent approach.


Last edited by Liam Dawe on 16 June 2016 at 2:55 pm UTC
dubigrasu Jun 16, 2016
Quoting: liamdaweThis is just a guide, people are free to use whatever demo file they choose.
Sure, but if users are to test and compare results it makes sense to use the same file.
Using whatever/random demo files will lead to confusing/conflicting comparisons.

The demo file PTS is using is dota2-pts-1971360796.dem (Global eSports Cup Finals):
http://openbenchmarking.org/innhold/6787c1cbb500e92a0b1e72fee354b026f6b29981

Which is the same 1971360796.dem demo file used by Valve devs :
https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/vulkan/873770-nvidia-vs-amd-opengl-vulkan-benchmarks-with-valve-s-dota-2?p=873909#post873909
Liam Dawe Jun 16, 2016
People are free to use whatever they like, I will think on our methods and maybe use that file for future stuff. I will edit the article later to include that as an option.
dubigrasu Jun 16, 2016
Quoting: liamdawePeople are free to use whatever they like
No one said otherwise Liam, I merely gave my opinion on this.
Liam Dawe Jun 16, 2016
Quoting: dubigrasu
Quoting: liamdawePeople are free to use whatever they like
No one said otherwise Liam, I merely gave my opinion on this.
As did i, not sure what you're getting at. I said I will take the feedback on board and add it into the article already :)

Edit: spelling


Last edited by Liam Dawe on 16 June 2016 at 3:14 pm UTC
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.