Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: performance bottleneck?  (Read 1742 times)

Gnoll Fortress

  • Bay Watcher
    • View Profile
performance bottleneck?
« on: December 06, 2015, 08:27:16 am »

Hello, my cpu is not running at max powa, not even 1 core is running at max powa. The game is running at 30 fps I think the ram is creating the bottleneck not the processor which is what I was always told would be the bottleneck, not much I can do about it tho. I have a full free 1 ghz before the single core hits its limit I have four cores so I can dedicate one to df and let music n windows run on the other three.
Logged

BoogieMan

  • Bay Watcher
  • Hi
    • View Profile
Re: performance bottleneck?
« Reply #1 on: December 06, 2015, 05:02:59 pm »

Did you have a specific question?

Dwarf Fortress (like many -if not most games) aren't designed in such a way so that they can fully utilize the way CPUs have been evolving, which is more cores rather than just faster and faster single cores. I think I read somewhere some work has been done to rectify that, but it'll probably be a slow process. From what I read the techniques required to enable multithreading and such is quite difficult and time consuming and makes it easier to break other parts of the program when changing and adding new parts.

It's getting more common, but it'll probably be some time before it seems commonplace. I think even AAA games with huge teams and tons of money don't fully utilize it, but do to some point. Most of the game will still run on one core, but other things like AI, sound, background simulation, texture loading and so on can be placed on the other cores so the main core can focus more on what the viewer sees and so forth.

As a casually informed noob on the subject that is the best I can explain it.

If I recall..

Better speed in Dwarf Fortress seems to need:
Powerful single cores - a single 3Ghz core is better for it than 4 2.66Ghz cores, since it'll largely just use one. Larger and faster cache on-board the CPU helps too.
Fast RAM, with low latency.
Maybe a SSD drive and a video card with fast 2d drawing?
« Last Edit: December 06, 2015, 05:06:33 pm by BoogieMan »
Logged
(╯°□°)╯︵ ┻━┻ BoogieMan, Forumscrub cancels tantrum: Seeking Dr. Pepper

Gnoll Fortress

  • Bay Watcher
    • View Profile
Re: performance bottleneck?
« Reply #2 on: December 06, 2015, 08:14:05 pm »

yea thats what I meant I always told that the cpu would take a beating but the ram is causing the bottleneck for performance for me and all these extra visitors are probably not helping either. this version Im getting the lowest fps Ive ever had.
Logged

SmileyMan

  • Bay Watcher
    • View Profile
Re: performance bottleneck?
« Reply #3 on: December 07, 2015, 04:45:56 am »

Out of interest, have you divided 100% by the number of cores you have in your system? If you get an answer that is just above what you are seeing as the total CPU usage of DF when it's running at full tilt, then you're seeing the correct behaviour for a CPU-bound single threaded program (which DF is in 99% of cases)

The OS schedules the thread to run on different cores at different times...and does this thousands of times per second. The reasons behind this are complex, and frankly pointless to care about, but you'll never see a program max out a single core unless you force it to (which would be a bad idea before you ask)
Logged
In a fat-fingered moment while setting up another military squad I accidentally created a captain of the guard rather than a militia captain.  His squad of near-legendary hammerdwarves equipped with high quality silver hammers then took it upon themselves to dispense justice to all the mandate breakers in the fortress.  It was quite messy.

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: performance bottleneck?
« Reply #4 on: December 08, 2015, 09:58:14 am »

Windows by default will shuttle a single-threaded program between cores for various reasons, so you won't see any one core showing 100% utilization in task manager. What you will see is DF using (100 / num cores) % of your total cpu. i.e. if you have a 6-core CPU, you will see DF hovering at ~16% CPU usage, which equates to one core.
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.

Gnoll Fortress

  • Bay Watcher
    • View Profile
Re: performance bottleneck?
« Reply #5 on: December 08, 2015, 10:24:30 pm »

Its using 20% of my quad core, so there is a 5 % its not using and I'm getting 20 fps in my fortress now.
Logged