Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 6

Author Topic: most vile enemy of all: lag  (Read 6379 times)

Urist_McArathos

  • Bay Watcher
  • Nobody enjoys a good laugh more than I do.
    • View Profile
Re: most vile enemy of all: lag
« Reply #15 on: April 03, 2011, 06:55:26 pm »

I'm running a quad core i5 2.67 Ghz, 6 GB DDR3 ram (not that it matters, as I believe DF doesn't support 32 bit yet, or multithreading), and I'm at five years in, 5x5 embark, gfps at 15, and I'm getting 45-65 depending on what everyone is up to.  The .25 patch brought FPS up to this from 35 for me, so I have no clue what your issue is.  As others have suggested, it's probably not a flat issue like "your processing power is too low", etc.  You'll have to fiddle with it to get the best results.
Logged
Current Community/Story Projects:
On the Nature of Dwarves

SimRobert2001

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #16 on: April 03, 2011, 07:02:26 pm »

It's probably your computer, zazq, or something about your computer. 2.1 isn't amazing anymore, plus there is always the chance something could be faulty, RAM issues,  some other hard/software-specific issue, possibly drivers(unlikely), etc.

Dwarf Fortress uses up to two cores. One core is used most of the game(computational stuff, pathfinding, etc), the other core is used for graphics. Number of cores hardly matters, I have a 2.8ghz 6 core, and DF will only use two of those cores. What matters most is the speed of your cores. Your graphics card isn't really going to change how fast the game processes, simply because DF is processor intensive. RAM probably won't make too much of a difference either. I've got 8 GB DDR3 and it probably helps, but it's difficult to measure how much it helps.

As you have only two cores, you don't have the luxury of designating two cores solely for DF like I could out of my 6.

Have you tried not screwing with the settings and just playing a default version of DF? Honestly it's probably your computer, or the way its set up, don't really know. As a side note, what's your OS?


DF is only single threaded.  SInce he has two cores, windows (or his OS) will try to move everything else over to the othe rcore.  The problem is, it really isn't THAT efficient at it.
Logged

Razonatair

  • Bay Watcher
  • Move along citizen, nothing to see here.
    • View Profile
Re: most vile enemy of all: lag
« Reply #17 on: April 03, 2011, 07:04:34 pm »

DF utilizes two cores, one for the game, one for the graphics. It isn't truly multithreaded in this way, but it does use two.

I reference this thread.

Having the graphics on a separate core probably doesn't make that much of a difference anyway.
« Last Edit: April 03, 2011, 07:23:46 pm by Razonatair »
Logged

ullrich

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #18 on: April 03, 2011, 08:31:09 pm »

When i drop to 10g_fps, the dwarves start leaving contrails behind themselves, which is interesting for a while, but gets annoying quick.

My box is a 3gb ram, 2.1 dual core, with a blinding Radeon 6850.  How can you get so much better fps than me?  It isn't background programs or anything like that, as I check for malware and annoying google/apple/evilsoft background programs often enough.  It just has to be some check box in the init files that makes it work right.  anyone got any ideas?
Well for more info Windows 7, only programms running are: Dwarf Therapist, Windows Live Messenger, Avira Antivir (Antivirus Software, very light on the computer), Laptop Battery & Wifi apps.
But doesn't really get hit hard if I have IE, Windows Explorer, Adobe Reader, or Mircosoft Office stuff open.

Also for graphics I use phoebus pack with print mode 2D and have no trails, screen resolution 1680x1050.
Logged
Ullrich cancels Work: Interrupted by Dwarf Fortress
Dwarf Fortress: Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

BurnedToast

  • Bay Watcher
  • Personal Text
    • View Profile
Re: most vile enemy of all: lag
« Reply #19 on: April 03, 2011, 10:11:57 pm »

I've read that clothes are causing major lags, basically when the clothes start to xrotx the dwarf starts looking for new ones (which due to another bug he might claim but will never actually put on anyway). So basically all your dwarves are constantly spamming an invisible check for new clothes all the time which bogs things down.

I have absolutely no idea if this is true or not. It does seem to explain why more dwarves = massive FPS loss even if the dwarves are all idling in the meeting zone doing nothing, though. Even if you lock/wall them in so they can't pathfind anywhere, fps won't really go up.

I have the same problem as you (forts lag = no fun = abandon after 5 years or so). My current fort I'm trying to tough it out till everyone's clothes rot off to see if that helps at all. I don't have very high hopes, but who knows?

If that's not the cause I really don't know what is. Pathfinding is the usual scapegoat but like I said you get lags even when dwarves are just idling around doing nothing, or locked into a small room. FPS friendly fort with proper traffic zones and locked doors to rarely used rooms vs my current basically randomly built fort inside the caverns (so all that cavern space to pathfind into on top of everything) and absolute no traffic zones at all seems to make very little difference.
Logged
An ambush! curse all friends of nature!

numerobis

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #20 on: April 03, 2011, 10:36:47 pm »

25 FPS doesn't seem bad to me.  That's about what I got on my laptop (with about the same system parameters as yours) even before the graphics updates.
Logged

Valkyrie

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #21 on: April 04, 2011, 12:13:45 am »

I've been on an anti-lag quest for a while now, as my machine is much older (2.45ghz single-core).  The main difference between my forts and what you've discussed is that I try to limit access to a single path between any two points, whereas your bajillion stairways would be the exact opposite philosophy.  My 'single path' can be several tiles wide, sure, to help avoid the traffic jams, but I try to ensure there's only one overall route from any given room to any other (central staircase, each floor having several hallways with rooms hanging off them).  While plentiful access routes would yield the shortest trip times, that's not what we care about - we care about pathfinding time, which cares about evaluating potential routes.  By restricting the number of viable potential routes (augmented ideally by good traffic designations and wall placements to get the pathfinding algorithm to those routes sooner), we cut down the pathfinding time, yielding better DF performance, even if per-dwarf travel time suffers.

I'm still unclear about the effects of wall-less designs.  I usually have one or two floors that are largely open space (a storeroom and my dining hall, which is basically a prepared meal storage room), with the rest the hallways-with-rooms design.  Expansion of those open rooms never seems to cause me fps issues, unless I add complex stockpiles along with it, which makes me blame the stockpiles, rather than the room design.  While currently the rooms of hallways-with-rooms /only/ open onto the hallways (usually through a 2-tile gap), in my older forts I'd have room-to-room opennings along shared walls or at the corners.  I had thought the many opennings would ease travel and improve things compared to the heavily-walled environment it came from, but instead it would very reliably kill my FPS.  So while I'm unclear on if highly-walled designs (which seem like they would be inefficient for pathfinding) or wall-less designs (which sound ideal, pathfinding-wise) are superior, the middleground between the two seems to be the worst place.  So I aim for low-complexity walled designs in general.

From your description, the many-routes stairwells seems to be the primary difference in fort design - I stick with 2x2, ~30 dwarf forts, with 1 cavern layer, about 50-60 z-levels (14 sky + ~3 soil + 5 above + ~10 cavern + ~5 magma + ~15 hfs, if I remember right) and close-to-flat terrain.  If I ignore magma and waterworks (aside from setting up a magma-workshop area via tunnels fed by fortifications, ie down at the magma layer), and keep the total animals low (<50), I can get 30-40fps, though I usually have trouble keeping animals much below 200, and the slowly accumulating item stores (even with atomsmashing goblinite) bring me down to 15-20 fps pretty easily when I'm not hypervigilant.  When forts start getting into the 4-10fps range, I usually give up.  Currently, I'm in a 18-22fps fort, my first goblinite-smashing one.  It's held up much, much better than I'd expected, compared with 31.18 & earlier forts.
Logged

bobhayes

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #22 on: April 04, 2011, 12:44:27 am »

I've read that clothes are causing major lags, basically when the clothes start to xrotx the dwarf starts looking for new ones (which due to another bug he might claim but will never actually put on anyway). So basically all your dwarves are constantly spamming an invisible check for new clothes all the time which bogs things down.

Interesting theory. I am testing it right now. My big fort is .18 and has a framerate of about 20 at the moment. It's a 12-year old fort, so everyone's clothes are rotting off of them at this point. I have 140-ish adult dwarves, 90 of whom are in the military and 50 civilians (plus a whole passel of kids). I told everyone, including military, to use their uniform only, created a "naked" uniform and put all the civilians in squads assigned to that uniform, and put everyone on active duty so they'd make any needed gears swaps.

First thing that happened is framerate dropped to about 8 and a million "store item in bin" jobs generated. I'll have to let it run for a while and see if things pick up after they finish stowing their crap.

Updated: Decided to go whole hog. Ordered everyone to strip naked. The poor, poor dwarven children...they're sitting there happily playing, tearing down walls, torturing kittens...suddenly all the adults start stripping off their clothes and heading into the barracks. "Oh Armok, it's New Year's Eve all over again! Hide your eyes, Urist! HIDE YOUR EYES!!!" FPS holding at 10.

Updated: All the store item jobs are finished. Everyone is training, eating, sleeping, wondering why nobody is bringing them food & water in the hospital, or moving between areas. Framerate has stabilised at 20-25.

Conclusion: this is not complete rubbish, it does seem to have a moderate impact. Gonna start atom-smashing squads and see what it does to framerate.

Population 188: framerate 25
Population 100: framerate 27, hard to get people to pull the lever, switching to magma
Population 70: framerate 40, even with the magma flowing
Population 10: framerate 60, even with the fires

I had 3 adult survivors and 7 kids. Two of the adults were content and happy, one was unhappy. (Whiner.) The kids are throwing tantrums left and right, naturally.

Ah well. Not quite ready to let this fort die, so time to kill the process and return to the alternate universe where magma doesn't fall from the sky.

« Last Edit: April 04, 2011, 01:25:40 am by bobhayes »
Logged

Maxwell5123

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #23 on: April 04, 2011, 01:32:30 am »

siding with the "your computer sucks" option because I can run Internet explorer with 2 tabs one on youtube playing music on on the DF wiki or on the forums AND running DF Dwarf therapist AND talk on skype with 4 PEOPLE with barely any lag......go buy a new computer
Logged

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: most vile enemy of all: lag
« Reply #24 on: April 04, 2011, 01:42:21 am »

Really no one knows, and anyone that claims to know is full of crap.

I've gone through forts like that and deleted almost every item and creature manually from memory itself without fully recovering my fps. Something get borked, and without access to the source it is difficult to figure out why.

The last ditch effort is to abandon and reclaim the fort, just use dfhack's dflair to keep your stuff from getting scattered. That doesn't always help though...

Those that say to get new computers are meh too. Computer programs shouldn't face exponential slowdowns.
« Last Edit: April 04, 2011, 01:44:06 am by devek »
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: most vile enemy of all: lag
« Reply #25 on: April 04, 2011, 02:02:23 am »

Do you have by chance a 2x2 or more stairwell? On some computer that seems to be the killer.
Ymmv,  but give it a try: hollow Out the stairs and create a spiral of downward ramps.
Logged

krenshala

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #26 on: April 04, 2011, 02:52:57 am »

From a computer support perspective, there are all kinds of known unknowns that can cause this:
* how the game works, exactly, is at least some of the issue
* how much physical memory in the computer has, which is also affected by ...
* how much swap space (aka Page File in Windows) is configured.  this is a biggie for Windows, unless newer than Vista fixes this, as the OS is horrible at file management, and a fragmented swap file slows down things more than paging itself (which is why I set a fixed sized swap just after OS install, and set it to at least twice the RAM, preferably four times).
* how fast is your hard drive (especially if paging is happening) ... normally the motherboard is waiting (im)patiently for the drive to finish finding or writing the data it has requested
* what model, and how fast is your processor, oh and what size L1 and L2 cache does it have, is it that cache dedicated to a core if you have a multi-core CPU, etc ... honestly, the L1/L2 cache sizes mean more to DF than the clock speed.  the bigger the on chip cache, and to a slightly bigger extent the on-die cache, the more efficiently DF can process stuff (up to the point where clock speed becomes the bottle neck, of course)
* what else is running at the moment, is it active (e.g., doing stuff) and on the same processor core as DF is, is anything else going to try to "help" when a file or memory area is used ... nothing like a game trying to load a file, only to have to wait for it to be scanned by the AV program ... again.
* others I'm not thinking of at the moment, as I'm sure there are some

The only real way one can "compare" DF frame rates is to have multiple identical computers hardware wise, hope one (or more) doesn't have a hardware problem, and be running the same processes (on the same cores), etc.  Even then variations in how the world is laid out, what orders have been assigned, what is currently on the map, trying to path, moving, etc, all play a part in the FPS.

tl;dr - its a  bloody nightmare to try and accurately compare DF playability between systems
Logged
Quote from: Haspen
Quote from: phoenixuk
Zepave Dawnhogs the Butterfly of Vales the Marsh Titan ... was taken out by a single novice axedwarf and his pet war kitten. Long Live Domas Etasastesh Adilloram, slayer of the snow butterfly!
Doesn't quite have the ring of heroics to it...
Mother: "...and after the evil snow butterfly was defeated, Domas and his kitten lived happily ever after!"
Kids: "Yaaaay!"

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: most vile enemy of all: lag
« Reply #27 on: April 04, 2011, 03:18:10 am »

Another thing I have noticed...

Very few people have uploaded laggy saves to DFFD.

It might be useful if people used seasonal backups and collected a few before and after fps going to shit saves.
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

jellsprout

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #28 on: April 04, 2011, 05:14:14 am »

What exactly is your fps? You say it is 1/4th of what you started with, but if you started with 500 fps then 125 fps for a year 5 fortress is still pretty high.

edit: Never mind, I just read you said in your third post your fps is about 25 now. My only recommendation is to only use what you need. Don't mine out any more space then you need and wall off all veins once they are cleared out. Don't produce anything that you aren't going to need and destroy anything you don't need at that moment. Don't make your map any larger than you need either. If you are only going to need the space of a 2x2 fortress, don't embark on a 3x3 area. That is still more than twice as large as a 2x2 embark.
Also make sure to give the DF process high priority.
« Last Edit: April 04, 2011, 05:18:36 am by jellsprout »
Logged
"Having been equipped with tracking collars so their migration and survival in the wild can be measured, the young Sea Serpent is released into the wild.  It is hoped that this captive breeding program will boost their terribly low population numbers and eventually see them removed from the endangered species list..."

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: most vile enemy of all: lag
« Reply #29 on: April 04, 2011, 06:06:36 am »

Another thing I have noticed...

Very few people have uploaded laggy saves to DFFD.

It might be useful if people used seasonal backups and collected a few before and after fps going to shit saves.

let's start with this:
this is a 2x2 lag free (TM) embark with 130 dwarves and first cavern breached.
(1 irrelevant mod and 1 so so: the first enable all metals for every use, the second remove clothes wear)


the laggy one I will update this evening
Logged
Pages: 1 [2] 3 4 ... 6