Announcement

Collapse
No announcement yet.

Radeon VRAM Optimizations Coming, But Help Is Needed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    Using R600_DEBUG=bostats glxgears, I can capture bostats. When I run Dota2 using R600_DEBUG=bostats steam steam://rungameid/570, nothing is captured however. I tried other games from Steam, and now I believe this is happening since I am launching the games from steam. I guess the environment variables are no longer valid as steam forks the new game process. I am searching for a solution...

    Comment


    • #62
      Run the game from steam. Do a "ps ax |grep hl2" to find out the actual launch options, quit the game (leave steam running) then try launching the game with the options you saw, and with your env vars added before them.

      Now this might be tricky, but it works. I launched Day of Defeat this way:

      First, launched it from steam, opened a terminal and did a "ps ax | grep hl2":
      Code:
      $ ps ax | grep hl2
      12088 pts/5    S+     0:00 /bin/sh -c "/media/bigdata/games/.steam/steam/SteamApps/common/Day of Defeat Source/hl2.sh" -game dod -steam -console -novid
      12089 pts/5    S+     0:00 /bin/bash /media/bigdata/games/.steam/steam/SteamApps/common/Day of Defeat Source/hl2.sh -game dod -steam -console -novid
      12092 pts/5    Sl+    0:18 /media/bigdata/games/.steam/steam/SteamApps/common/Day of Defeat Source/hl2_linux -game dod -steam -console -novid
      12122 pts/6    S+     0:00 grep hl2
      Tried all 3 of them and only the one that begins with "/bin/bash" works if i launch the game separately (steam HAS to be running):

      Code:
      /bin/bash /media/bigdata/games/.steam/steam/SteamApps/common/Day\ of\ Defeat\ Source/hl2.sh -game dod -steam -console -novid
      Notice the "\" characters - those are "escape" characters, needed where are spaces in the directory names, for example the directory is named "Day of Defeat Source", to be interpreted correctly by bash you have to change it in the command line to "Day\ of\ Defeat\ Source" to tell bash to interpret those spaces literally.
      This goes for all directories that have spaces in them.

      So it would be something like

      Code:
       R600_DEBUG=bostats /bin/bash /media/bigdata/games/.steam/steam/SteamApps/common/Day\ of\ Defeat\ Source/hl2.sh -game dod -steam -console -novid

      PS Whats your "glxinfo|grep Opengl" output after installing that package?
      Last edited by gradinaruvasile; 19 January 2014, 02:46 AM.

      Comment


      • #63
        Looking at what process is really running using the ps command worked. With Dota 2, it is:
        R600_DEBUG=bostats ~/.local/share/Steam/SteamApps/common/dota\ 2\ beta/dota.sh -console
        Now, for Dota 2, I had to put a file called steam_appid.txt into ~/.local/share/Steam/SteamApps/common/dota\ 2\ beta/ with the content of the Dota 2 app id (570). If that file is not present, Steam will restart the game and you'll not have the statistics recorded.

        Your query on what glxinfo produces:
        glxinfo|grep -i Opengl
        OpenGL vendor string: X.Org
        OpenGL renderer string: Gallium 0.4 on AMD REDWOOD
        OpenGL core profile version string: 3.1 (Core Profile) Mesa 10.1.0-devel (git-1c5e296 saucy-oibaf-ppa+curaga)
        OpenGL core profile shading language version string: 1.40
        OpenGL core profile context flags: (none)
        OpenGL core profile extensions:
        OpenGL version string: 3.0 Mesa 10.1.0-devel (git-1c5e296 saucy-oibaf-ppa+curaga)
        OpenGL shading language version string: 1.30
        OpenGL context flags: (none)
        OpenGL extensions:

        Comment


        • #64
          Something early to report. I'm in the middle of converting the traces to the custom binary format (up to 1300x compression ratio over plain text, 1.5-12x over xz-compressed text, hell yeah), so not everything's checked yet, but Xonotic is standing out.

          Xonotic's memory behavior is exceedingly efficient compared to everything else. There's very little trashing, almost every buffer is reused well. Props to them.

          Comment


          • #65
            Originally posted by gradinaruvasile View Post
            Code:
             R600_DEBUG=bostats /bin/bash /media/bigdata/games/.steam/steam/SteamApps/common/Day\ of\ Defeat\ Source/hl2.sh -game dod -steam -console -novid
            Or go to steam, right click on the game, go to settings and write this to launch options:
            Code:
            R600_DEBUG=bostats %command%
            then start the game from within steam.

            Comment


            • #66
              Originally posted by curaga View Post
              Xonotic's memory behavior is exceedingly efficient compared to everything else. There's very little trashing, almost every buffer is reused well. Props to them.
              I find this interesting, if I can manage I'll try running some traces on darkplaces running quake, and we can see if that efficiency is a part of the original tree or the fork the Xonotic team made.

              Comment


              • #67
                Can this work eventually be used for all radeon gallium drivers or it will have some arch specific code (e.g. it will only apply on r600 requiring major porting for radeonsi and r300)?
                Could it eventually be generalized even more (nouveau, intel)?
                Could you also add r300 support for log files generation?

                Thanks!

                Comment


                • #68
                  So, I have a desktop with a 7850, and a laptop with a 7660G (iGPU) + 7670M (dGPU; muxless). I mostly play stuff on Steam, but I also have a few games I play through Wine.

                  I'll be using Xubuntu 13.10 + 3.13 Kernel +oibaf's PPA on both computers (whenever I decide to reinstall stuff later today).

                  1. On my laptop (being r600(g?)-based I believe), would I just start up Steam via R600_DEBUG=bostats steam on a Terminal and then start Dota 2, or could I do the command listed on the Phoronix article (R600_DEBUG=bostats dota2)? I just read a bit up the page and saw that I could just put R600_DEBUG=bostats %command% in the game's launch parameters in the Steam library options?

                  2. For the Wine applications, lets say I have a game (osu! in this case) in it's own prefix. Would I run R600_DEBUG=bostats WINEPREFIX='/home/espionage724/Wine Prefixes/osu!' WINEDEBUG=-all wine '/home/espionage724/Wine Prefixes/osu!/drive_c/Program Files/osu!/osu!.exe' like that (does it matter where I put the variable at; like would it be better to run it before the actual Wine command)?

                  3. And for anything native, I'd just do R600_DEBUG=bostats APP-NAME?

                  4. As for the /tmp/ log trace, lets say I mount the /tmp/ directory to RAM on a 6GB (laptop) or 8GB (desktop) system. Would the trace's size be a problem at all? (I have around 4-6GB RAM free with general desktop usage)

                  5. Also, just to be sure, are test results from radeonsi hardware needed at all?

                  6. And once I get some logging done, I just compress it with XZ, upload it, and send an email to the address in the article with the link?

                  Just want to make sure I do everything right

                  Comment


                  • #69
                    1. Setting R600_DEBUG=bostats %command% works the best. Set once and you're golden until you unset.
                    3. Yes
                    4. I get around 2GB per 10 minutes of Dota 2. I suggest you don't capture into RAM unless you know that you're only playing for a few minutes.
                    6. Yes. I suggest you add additional information in the email. A sample that I did:

                    Game: Dota 2
                    Game version: latest update on January 9, 2014
                    Settings: Highest settings on 1920x1080 (low shadows)
                    Kernel: 3.13.0-031300-generic
                    GPU: 6550M
                    GPU RAM: 1GB DDR3
                    CPU: i3 380m 2.5GHz
                    RAM: 8GB DDR3
                    Distribution: Ubuntu 13.10
                    OpenGL version string: 3.0 Mesa 10.1.0-devel (git-d6b6ab5 saucy-oibaf-ppa+curaga)

                    Comment


                    • #70
                      Originally posted by oibaf View Post
                      Can this work eventually be used for all radeon gallium drivers or it will have some arch specific code (e.g. it will only apply on r600 requiring major porting for radeonsi and r300)?
                      Could it eventually be generalized even more (nouveau, intel)?
                      Could you also add r300 support for log files generation?
                      Yes, the memory scoring can be shared by all radeon gallium drivers (r300g, r600g, radeonsi). Radeonsi pretty much comes for free as it shares most of the code. R300g shares no code, so it would require some more work, which I won't be doing since I don't have any r300g cards (can't test).

                      Nv, intel: the userspace code is arch independent, but the kernel component is per-driver. If they're interested, they can port it fairly easily. Intel already has somewhat better memory handling than the other drivers: it tries to minimize fragmentation by dropping close together buffers, instead of by LRU. How its effectiveness compares to the scoring here is up for question, but for the current radeon/nv state the Intel approach outdoes them.

                      r300g logging: no shared code, and I can't test with no cards, so this won't be coming.

                      Comment

                      Working...
                      X