Confused about Max Payne 3 performance (CPU bottleneck?)

Discussion in 'CPUs and Overclocking' started by lehtv, Nov 4, 2012.

  1. lehtv

    lehtv Elite Member

    Joined:
    Dec 8, 2010
    Messages:
    11,799
    Likes Received:
    51
    I did a pretty detailed investigation into GPU load, CPU load and framerate over time at different settings. Basically, I played a 10 minute segment in the beginning of Chapter 5, recorded framerate with Fraps, GPU load with GPU-Z, CPU load with Performance Monitor, then turned the data into graphs... but the graphs don't help, they just make matters worse.

    I have no idea how to interpret the graphs, please help me out.

    Test system

    i7-920 @3.36GHz
    Asus P6TSE
    3x2GB 1600MHz
    Sapphire 7950 Vapor-X @ stock 850MHz

    Mid-high settings

    [​IMG]

    [​IMG]

    [​IMG]

    More details:

    [​IMG]

    High-ultra settings

    [​IMG]

    [​IMG]

    [​IMG]

    More details:
    [​IMG]

    Then what?

    Now, isn't CPU bottlenecking supposed to work like this: CPU is working at 100% or near there, resulting in a drop in GPU load and thus framerate. If so, you could infer that a drop in GPU load probably means the CPU is bottlenecking it. But here, the CPU is not working at full capacity, not even close. Yet GPU load and framerate stay more stable with high-ultra settings where CPU load is considerably lower overall.

    :confused:
     
    #1 lehtv, Nov 4, 2012
    Last edited: Nov 5, 2012
  2. Loading...

    Similar Threads - Confused Payne performance Forum Date
    How is your G4560 performing in games? CPUs and Overclocking Yesterday at 9:57 AM
    Ryzen bclk confusion CPUs and Overclocking Apr 9, 2017
    I am HIGHLY confused about Skylake/Kaby Lake memory speeds CPUs and Overclocking Feb 24, 2017
    Post your Ryzen Blender Demo Scores! (AMD clarifies Blender Benchmark Confusion, Run @ 150 Samples) CPUs and Overclocking Dec 13, 2016
    Complete confusion by INTEL Corporation??? CPUs and Overclocking Dec 11, 2016

  3. Termie

    Termie Diamond Member

    Joined:
    Aug 17, 2005
    Messages:
    7,904
    Likes Received:
    43
    Very interesting results - thanks for sharing them.

    Right off the bat, I'd ask you to just give us the min-avg-max for the two settings. That will help us dissect the data a bit more easily.

    As an aside (or perhaps an actual answer to your question), if you look closely at the medium CPU graphs, you'll see that the two threads for each core hand off almost precisely "on cue", such that the game is actually only using 4 threads at any given moment. Overall, the CPU load still looks a bit higher than on ultra settings, but it's not quite as divergent as the graphs make it out to be.

    Again, if you were able to give average CPU usage as a datapoint, rather than the graphs, it would actually be more helpful here.
     
    #2 Termie, Nov 4, 2012
    Last edited: Nov 4, 2012
  4. boxleitnerb

    boxleitnerb Platinum Member

    Joined:
    Nov 1, 2011
    Messages:
    2,596
    Likes Received:
    1
    CPU usage is not very telling. You could have less than 60% on each core and still the fps could increase with clock speed - I have seen that in some games.

    And 10mins is way too long - not repeatable, too much fluctuation.

    Go into the game, make a screenshot with EVGA Precision OSD that shows GPU usage, fps and CPU clock. Alt-tab out of the game, go into windows energy options and reduce the max CPU usage by a bit. Go back into the game and make another screenshot at the same location and post them both here.
    If you want, you could do this at several locations, say three. This is the only reliable way to check for a CPU bottleneck. I would usually suggest overclocking further, but I don't know if that is possible with your CPU. But it really doesn't matter. If you're that CPU bottlenecked, a 10% increase in clock frequency will increase fps by 10% and a decrease will decrease the fps by 10%.

    With those settings I am 100% sure that you indeed are CPU bottlenecked. Low resolution, no tessellation (why?), no MSAA and only FXAA, fast GPU. Not surprised at all.
     
  5. lehtv

    lehtv Elite Member

    Joined:
    Dec 8, 2010
    Messages:
    11,799
    Likes Received:
    51
    Code:
            Medium-high    
        Framerate    GPU load (%)
    Min      49            62
    Avg      110           87
    Max      197           99
    
    
            High-ultra    
        Framerate    GPU load (%)
    Min      40            63
    Avg      66            93
    Max      115           100
    You're right. I've now added average CPU thread load in the OP, they are much more telling than the graphs.

    You're also right about the game using four cores. In Techspot's performance analysis, the game tops out with quad cores.

    It was pretty repeatable, being a scripted one-way game. Look at the graphs for the two settings - the major peaks and valleys are in the same places. I wanted to get a sizeable dataset to work with.

    Interesting, I'll do that and post back soon. If there's no bottleneck to be found, how would you explain the dips in GPU load?

    I play at medium-high because the game's vsync sucks. If I increase settings any more, the game forces to 30fps occasionally, when without vsync it wouldn't even break below 60fps. It's as if the game anticipates a dip below 60fps. But at 30fps the game just looks stuttery, so I go as low on the settings as needed to avoid the 30fps dips. This is not adaptive vsync, it's just an artificial fps limiter. FWIW I don't really notice an appreciable difference in image quality between medium/high and high/ultra.
     
    #4 lehtv, Nov 5, 2012
    Last edited: Nov 5, 2012
  6. boxleitnerb

    boxleitnerb Platinum Member

    Joined:
    Nov 1, 2011
    Messages:
    2,596
    Likes Received:
    1
    The game is scripted, but you cannot be sure that during that whole 10 minutes you react always the same way, look in the same directions, performed the same movements etc. For a general assessment this is okay, but if you want to be accurate, you need something more static, thus short.
     
  7. PrincessFrosty

    PrincessFrosty Platinum Member

    Joined:
    Feb 13, 2008
    Messages:
    2,185
    Likes Received:
    20
    In an ideal world yes, in the real world, no.

    CPU performance is a tricky beast to gauge, mainly due to the nature of multi-threaded applications, the way this works usually (and I've not confirmed this for Max Payne 3) is you have a master thread which spawns the other worker threads and generally speaking delegates work to them and keeps track of everything, the total frame rate you'll achieve is basically tied to this one master thread that runs the basic game logic, if this maxes out its assigned core then it doesn't matter what the other threads are doing, your frame rate will be capped by the CPU. The worker threads often deal with AI, physics and such, depending on how the engine is coded

    To further complicate things, multi-threaded systems share memory and threads/cores can enter wait states and essentially remain idle while another core works on some shared memory, this inefficiency in code can lead to being CPU bottlenecked even when all cores are less than 100% loaded.

    In your case it seems like you are mostly GPU limited, you can see the GPU graphs hit 100% usage almost perfectly during certain points. The other periods would suggest a temporary CPU bottleneck. Remember that the bottleneck can shift either way depending on relative load on the systems at the time.

    Since your CPU graphs are average load only and don't show peak loads, it's possible that the CPU peaked and became a temporary bottleneck during these periods. For example if an explosion goes off and suddenly you need 50x the particle count to be calculated the thread(s) dealing with physics might max out their core(s).
     
  8. lehtv

    lehtv Elite Member

    Joined:
    Dec 8, 2010
    Messages:
    11,799
    Likes Received:
    51
    Thanks for that analysis, that's pretty informative.
    Click on the thumbnails titled More details to see CPU load per thread over time
     
  9. lehtv

    lehtv Elite Member

    Joined:
    Dec 8, 2010
    Messages:
    11,799
    Likes Received:
    51
    On second thought, I don't think this is a good idea. If the CPU is bottlenecked, I should see it most clearly during firefights where a lot is going on. You can't capture those situations reliably on a screenshot. What I'm going to do: do the exact same experiment as in the OP but with 80% maximum CPU load set in the power options. This'll take a while but at least the results will be properly comparable to the original results with 100% maximum CPU load.
     
  10. Termie

    Termie Diamond Member

    Joined:
    Aug 17, 2005
    Messages:
    7,904
    Likes Received:
    43
    Well, I can't really tell you why cpu load would be 20% at ultra and 30% at medium. But I'm almost certain this is some other phenomenon than bottlenecking. You clearly aren't bottlenecked, as your frame rate is much higher at medium.

    If this all started because you had slowdowns at ultra, I think I have the solution for you: run all ultra but turn off MSAA. It doesn't do much for visuals and takes a 50% hit at 4x. With your GPU, you should never have to dip below 60fps. My system averages way over 60 on ultra without MSAA, but something like 37fps with it. There's a known problem with the MSAA implementation, but otherwise this is an incredibly smooth game engine. I am very impressed with the seamless gaming on it. In game, I never think that the engine takes me out of the game.
     
  11. boxleitnerb

    boxleitnerb Platinum Member

    Joined:
    Nov 1, 2011
    Messages:
    2,596
    Likes Received:
    1
    My bad, I only looked at the left scale. Oops.
     
  12. PrincessFrosty

    PrincessFrosty Platinum Member

    Joined:
    Feb 13, 2008
    Messages:
    2,185
    Likes Received:
    20
    Oops didn't see them, apologies.

    Well the load tends to peak at about 80% which across the 4 physical cores actually isn't that bad for a multi-threaded game, I've seen a lot worse to be honest. That is to say that you could quite easily be CPU bottlenecked at 4 cores peaking to 80% usage simply due to inefficiencies in the multi-threading.

    I've spent a bit of time looking at Planetside 2 for example, this is a (potentially) highly CPU bound game as active players in one region peak. However their CPU utilization often looks pretty bad, it can be between 50-80% usage at most on each core.

    The only explanation I have for this is badly implemented threading, the threads are waiting on the results of other threads or for shared memory to be unlocked. It happens in lots of different apps, this is hardly an exception. Generally speaking the better metric is the GPU utilization, since graphics processing is highly parallel and has been for a long time, usage on the GPU is significantly more efficient and 99%+ utilization in GPU bottleneck situations is pretty common. If your GPU is at say 80% then it's fairly safe to say your CPU is the bottleneck, even if the total usage is low.

    Another game I remember suffering from this very badly was Batman Arkham Asylum, with CPU PhysX turned on and the advanced effects used a massive load was put on the CPU, your frame rate would tank down to 10-15fps, but if you checked your CPU usage it was often <50% on each core.
     
  13. lehtv

    lehtv Elite Member

    Joined:
    Dec 8, 2010
    Messages:
    11,799
    Likes Received:
    51
    I did this, and took min-avg-max. Here are the results, compared to the original data in from the OP:

    [​IMG]

    The GPU load data could be interpreted in support of a CPU bottleneck at 80% CPU limit, but the FPS data certainly falls within error margins... The the run-through took me a bit less time here and there, which could skew the results.

    It still remains an open question why GPU load doesn't stay >95% all the time, not even on the ultra settings which are much more GPU intensive. Any ideas?
     
  14. Jaydip

    Jaydip Diamond Member

    Joined:
    Mar 29, 2010
    Messages:
    3,678
    Likes Received:
    15
    Your CPU can't feed the GPU first enough.OC your CPU by 200-300Mhz and repeat the test.
     
  15. boxleitnerb

    boxleitnerb Platinum Member

    Joined:
    Nov 1, 2011
    Messages:
    2,596
    Likes Received:
    1
    What clocks do 80% and 100% correspond to?

    Looks like a GPU bottleneck according to the fps, albeit not a complete one (then, fps wouldn't change at all). It's weird though that the GPU load is that low on average.

    I would repeat these experiments not with a run-through but at specific points to minimize the margin of error. You can Alt-tab out of the game and change the CPU load percentage on the fly to get multiple values without having to restart the game.
     
  16. lehtv

    lehtv Elite Member

    Joined:
    Dec 8, 2010
    Messages:
    11,799
    Likes Received:
    51
    3.36 is the highest I can get, unfortunately.

    What do you mean? I just reduced maximum processor state in the power options like you told me to.

    The fps difference could be within statistical error margins, I would have to run the test several times to nail it down...

    Yeah I know, but as I said earlier, CPU bottlenecking should raise its head most easily in firefights and it's not feasible to just alt tab in and out during one.
     
  17. Termie

    Termie Diamond Member

    Joined:
    Aug 17, 2005
    Messages:
    7,904
    Likes Received:
    43
    lehtv - I'm still not sure what your reason for conducting these tests was, or what your theory is on cpu bottlenecking. Is it because you had lower performance than you wanted at ultra, or is it simply because you realized CPU utilization went down at ultra? Or is it because your GPU usage is not maxed at 99%?

    Either way, I don't think you've identified a case of cpu bottlenecking. In fact, if anything, the lower CPU utilization at ultra could be a sign that the CPU is waiting on the GPU to a greater degree. And while some games will peg a GPU at 99%, I don't think Max Payne is one of them - it's not a straightforward FPS, and the CPU is probably doing a lot more work on the AI than the typical shooter.
     
    #16 Termie, Nov 5, 2012
    Last edited: Nov 5, 2012
  18. sm625

    sm625 Diamond Member

    Joined:
    May 6, 2011
    Messages:
    8,175
    Likes Received:
    132
    You're right that your cpu is nowhere near fully loaded. I actually find it surprising that not a single thread ever once appeared to peg a cpu. That is a very well threaded game!

    In response to the part I bolded, all I can say is that appears to be a subjective interpretation. I think the GPU load is more stable with high-ultra settings because it is closer to 100%. If your gpu was loaded to 100% 100% of the time, then it would be 100% stable, right? That's all that is. As for framerate, I see it being exactly the same in terms of stability. If framerate momentarily drops 30% on one setting, you can usually see it momentarily dropping 30% on the other setting in the same spot. Especially around the 9 minute mark where they both get really jumpy.
     
  19. lehtv

    lehtv Elite Member

    Joined:
    Dec 8, 2010
    Messages:
    11,799
    Likes Received:
    51
    I wouldn't have done any of this if it weren't for the way vertical sync works in this game. Performance would be great even on high/ultra settings (bar the AA) if it weren't for the fact that vsync forces the framerate to 30fps whenever it dips below 60fps. Or, it seems to me, it anticipates it and forces 30fps before the game actually reaches 60fps.

    This made me think that maybe the GPU isn't working to its full capacity and maybe the CPU is bottlenecking it, and I figured out how to make logs out of everything, so I thought why not.

    I don't have a theory on bottlenecking, I'm basically just looking at the data first and then trying to find out what it means. And I don't know what it means

    Yeah, I'm not convinced either.

    I don't think it works that way. Why shouldn't the GPU work at 100% if it's not the CPU bottlenecking it?
    Hmm, you're right about the framerate, it's about as stable on both settings. But the GPU load stays closer to 100% on the higher settings for some reason, that requires some explanation, no?
     
    #18 lehtv, Nov 5, 2012
    Last edited: Nov 5, 2012
  20. aaksheytalwar

    aaksheytalwar Diamond Member

    Joined:
    Feb 17, 2012
    Messages:
    3,389
    Likes Received:
    0
    Get any ivy if possible or wait for haswell.
     
  21. lehtv

    lehtv Elite Member

    Joined:
    Dec 8, 2010
    Messages:
    11,799
    Likes Received:
    51
    aaksheytalwar I am planning to possibly get i5-3570K+Z77 sometime in the future since I don't really think it's worth it for me to wait 6 months for a 10-15% improvement in CPU performance. The power consumption and iGPU aspects don't really weigh much for my purpuses... It'd definitely be interesting to repeat these tests with a 3570K.
     
  22. Rvenger

    Rvenger Elite Member <br> Super Moderator <br> Video Cards
    Super Moderator

    Joined:
    Apr 6, 2004
    Messages:
    6,293
    Likes Received:
    4
    I am curious to see how an FX-8350 responds in this game since the i7-920 performs similar to the FX chip.
     
  23. Termie

    Termie Diamond Member

    Joined:
    Aug 17, 2005
    Messages:
    7,904
    Likes Received:
    43
    Actually, in very few games does a GPU always work at 100%. Maybe BF3 single-player, maybe a few other games. But in new games, you'd rarely see this.

    And as TechSpot found, there is very little differentiation between any quad CPUs in MP3, which suggests you're not hitting a CPU limitation: http://www.techspot.com/review/537-max-payne-3-performance/page7.html

    I think it's just your use of MSAA plus vsync that's causing the massive slowdowns.
     
  24. lehtv

    lehtv Elite Member

    Joined:
    Dec 8, 2010
    Messages:
    11,799
    Likes Received:
    51
    I don't use MSAA.
     
  25. Termie

    Termie Diamond Member

    Joined:
    Aug 17, 2005
    Messages:
    7,904
    Likes Received:
    43
    Well, you did here:

    I'm just saying that there might be something causing slowdowns, but I don't think it's a CPU limitation.

    Have you tried the test at stock settings on your CPU and memory? If so, is the framerate at high-ultra lower than what you posted above (66fps avg, 40fps min)? If not, then it isn't a cpu limitation.

    You've mentioned that the CPU is at max OC - I wonder if something might be causing slowdowns related to your OC being too high and thus unstable (rather than your CPU being too slow overall).
     
    #24 Termie, Nov 6, 2012
    Last edited: Nov 6, 2012
  26. lehtv

    lehtv Elite Member

    Joined:
    Dec 8, 2010
    Messages:
    11,799
    Likes Received:
    51
    In terms of GPU load, you see bigger dips with the medium settings that don't use AA, and the framerate varies similarly in both cases.

    I'll try it out with stock CPU clock tomorrow.