Follow us on Steam Follow us on FB Follow us on Twitter Subscribe on Youtube

Announcement

Collapse
No announcement yet.

UT2004 and the affinity command

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

  • UT2004 and the affinity command

    UT2004 is a NON multi-threading application, and as such can perform worse on a multi-core cpu, or "skips" at times (looks like lag, but it's the cpu core changing / purging cache on threads) Here is a command line (batch file etc...) option using affinity that can be used to lock UT (or any app) onto specific cores.

    Example:
    start /affinity 0x04 C:\UT2004\System\UT2004.exe

    Where the Hex 0x04 = the 3rd core. (this is the most generic form, and works on any i3,i5,i7 since they will have at least 4 cores showing, either 4 real or 2 real and 2 hyperthread or more)

    The core number is a binary mask for the cpu core value. 2^x converted to hexadecimal

    First core = 0x01 0000 0001
    Second core = 0x02 0000 0010
    Third core = 0x04 0000 0100
    Fourth core = 0x08 0000 1000
    Fifth core = 0x10 0001 0000
    Sixth core = 0x20 0010 0000
    Seventh core = 0x40 0100 0000
    etc...

    You can add numbers to use multiple cores, but it's a binary mask converted to HEX.

    start /affinity 0x06 C:\myapplication.exe
    Would use the 2nd & 3rd cores

    start /affinity 0x42 C:\myapplication.exe
    Would use the 2nd and 7th cores

    **Be aware, Hyperthreading means every other core is a virtual core, and should not be used for affinity unless it is paired with the correct physical core,

    If hyperthreading is ON, then

    Core 1 = Physical core
    Core 2 = Core 1 Hyperthread
    Core 3 = Physical core
    Core 4 = Core 2 Hyperthread
    etc...

    start /affinity 0x03 C:\UT2004\System\UT2004.exe
    = Core 1 + Core 2
    Would be 1st Physical and 1st Hyperthread core (which are in reality the same core).

    start /affinity 0x06 C:\UT2004\System\UT2004.exe
    = Core 2 + Core3
    Would be the 1st Hyperthread core and the 2nd physical core - BAD

    Only assign UT to a single physical core, and don't use the 1st core (windows primary core) I would use the last physical core.

    0x04 on a 2 core w/ hyperthreading (3rd core)
    0x02 on a NON hyperthreading dual core CPU (2nd core)
    0x08 on a Quad core w/o hyperthreading (4th core)
    0x40 on a Quad core w/ hyperthreading (7th core)

    A non multi-threading app like UT2004 can only use the total CPU / number of cores.

    So a on Quad core w/o Hyperthreading, UT can only use about 25% of the total CPU (100% / 4 cores) You can use task manager to check to see if UT is on one core after using affinity as it will peak that core at times and use over 50%.
    1) It's not "Bunny Hopping", it's Red-Neck Dodging...
    2) I don't "SPAM", I use the randomized tactical deployment of munitions...
    3) If you don't like it - to bad, my bunny-hopping-spam will kill you.
  • #2

    what the fuck did you just call me?
    I'm not gay........but $20 bucks is $20 bucks!

    Comment

    • #3

      Thanks Born!

      Comment

      • #4

        Or you can use this:
        https://robpol86.com/_downloads/Imagecfg.zip

        It does the work for you, but I advise using the first core as it's the first the game looks for and every OS since Windows 7 will push the OS operations to Core 3 on a Hyperthreaded CPU.

        0x01 = 1 = CPU0
        0x02 = 2 = CPU1
        0x04 = 4 = CPU2
        0x08 = 8 = CPU3
        0x10 = 16 = CPU4
        0x20 = 32 = CPU5
        0x40 = 64 = CPU6
        0x80 = 128 = CPU7

        Like Born said every other core, on an Hyperthreaded CPU, is the Hyperthread core, so if you use CPU 1, it'll actually be forced to use CPU 0 and 1, since they're directly associated with each other. CPU 0 is the Physical Core while CPU 1 is the Logical core. In other words, selecting the Hyperthread Logical core will force the Physical core to be active as well, but I've seen no game degredation using core 0 and 1 since UT 2004 was patched to use ONE hyperthreaded core for the last of the Intel Pentium 4's


        Also, for NON AMD users, make sure you do NOT have AMD Mutlti core enabler installed as it will actually force any game to try to use all cores, regardless of the command line affinity options. On AMD Multicore systems, it works fine and will not override the command line, but I've got many older games that I found this to be an issue on Intel systems.

        Comment

        • #5

          Haha!

          Originally posted by HTM~FooFoo(Ack!) View Post
          what the fuck did you just call me?

          Foo just been called a 'non multi-threading app' - feel the Bern!

          Comment

          • #6

            you mother fu...wait...what?
            I'm not gay........but $20 bucks is $20 bucks!

            Comment

            • #7

              Batman -

              I'd like to know the info source for the "core 3" use by windows 7+, beacuse I have never heard this (working as an IT / networking & hardware prof.) nor have I ever seen this watching task manager regulary on servers and workstations under load. I see windows using core 1 (CPU 0) for MOST operations, and MOST applications. I've worked to visually track rescource use on probably 50+ systems over time (weeks). NEVER seen what you said about core use. I have seen windows use them evenly or in order, from low to high based on load, with a few hiccups. the "evenly" use is almost always attributed to a non-threading / 32 bit apps.

              It there is an MS KB about it, or a white paper I'd like to read up on that if I've missed something.

              -Born

              [QUOTE=HTM~Batman]

              "It does the work for you, but I advise using the first core as it's the first the game looks for and every OS since Windows 7 will push the OS operations to Core 3 on a Hyperthreaded CPU."
              Last edited by Born; 10-24-2016, 10:19 PM.
              1) It's not "Bunny Hopping", it's Red-Neck Dodging...
              2) I don't "SPAM", I use the randomized tactical deployment of munitions...
              3) If you don't like it - to bad, my bunny-hopping-spam will kill you.

              Comment

              Working...
              X