Page 1 of 5
consumes too much CPU when it should be idle
Posted: Sun Sep 05, 2010 11:09 pm
by greycat
Beta 10b, compiled from source on Linux.
I rolled up a fighter, played for a bit, saved with Ctrl-S, then switched to a different "workspace" (is that the word? the things you can click on in the FvwmPager that make the screen jump to a different place). I noticed that a lot of CPU was being used by something unexpectedly, and ran 'top' and saw that t-engine was showing 80.6% CPU use and had consumed a total of 28:46.51 minutes of CPU by the time I stopped top.
Re: consumes too much CPU when it should be idle
Posted: Sun Sep 05, 2010 11:20 pm
by darkgod
Hummm
COntinuously not for a few tens of seconds while it was saving ?
Weird. Can you get me a full log ?
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 4:11 am
by greycat
"The file is too big, maximum allowed size is 256 KiB." Meh. It's ~350kB bzipped.
Then you get to deal with my slow DSL upload:
http://wooledge.org/~greg/Arzgh.bz2
Additional info: this is the "no music" tarball, and I didn't copy the music from an older version.
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 6:17 am
by Final Master
I'm not sure if it is using too much cpu, but beta 9 and now beta10b are both horribly lagged in every action and menu except for the music. It's also skipping commands. The game has gotten ery very very difficult to play because of this. I didn't have any slow down like this in the earlier versions of beta3/4/5/7. Also, saving and loading files takes minutes... Any ideas guys?
On an xp, beta 10b.
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 7:54 am
by darkgod
Thanls greg
Final Master: Uhhhhhh ??
It should be faster not slower ... hummm.
You do not by any chances press ctrl+alt+shit+p while playing ? (this runs the profiler which makes things SLOW).
Also if you run beta 7 today, is it slow or not ?
On what platform ?
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 8:06 am
by darkgod
Can you send me a log too final master please jsut in case there is something obvious inside =)
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 5:04 pm
by Final Master
I'm not sure how to do a log or where it's at. Also, I am running it with the profile online... I'll try it without being logged in.
I'll also back track a bit to see when the slowdown happens.
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 5:58 pm
by j-rod
my .02, 10 works well on my desktop, but that's a dual core with 4gig of RAM, 32bit Ubuntu 10.04. I also run an older Thinkpad R40, that is a P4 with I think a gig of RAM. (also ubuntu 10.04) Beta9 ran at an acceptable rate, but something in 10 is making it lag pretty bad. I had to turn the sounds totally of because of the stutter, and the lag affects gameplay. Not a huge deal, but figured I would throw it out there when I saw this thread.
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 7:54 pm
by darkgod
What does the game report as FPS in the log when idle ?
Is it slow always ? when moving ? when monsters are around ?
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 8:04 pm
by edge2054
Here's a log where I hit a minute or so lag spike after casting phase door and then mana flow. The first tick of mana flow took a good while to kick over or maybe it was right after I drank the potion that it stalled.
But once the hiccup passed it was fine. Game wasn't saving at the time though this has caused quite a bit of lag on my machine (Windows XP).
Code: Select all
104 ticks in 10.15 seconds = 10.2463 TPS
166 frames in 10.053 seconds = 16.5125 FPS
[LOG] Grendel casts Time Prison.
USING table: 13AE7EF0 Time Prison
checkHit 39 4
=> chance to hit 95
[LOG] Icy wyrmic uruk-hai is removed from time!
addTmpVal invulnerable 1 :=: 3 3
[PARTICLE] Loading from /data/gfx/particles/time_prison.lua
166 frames in 10.048 seconds = 16.5207 FPS
52 ticks in 10.876 seconds = 4.78117 TPS
[LOG] Manathrust is still on cooldown for 1 turns.
[LOG] Grendel casts Lightning.
USING table: 1A08CF90 Lightning
[SPELL CRIT %] 4.8
[PROJECTOR] starting dam 101.66666666667
[PROJECTOR] after difficulty dam 101.66666666667
[PROJECTOR] res 9.7277725666593 0.90272227433341 on dam 101.66666666667
[PROJECTOR] final dam 91.77676455723
[LOG] Grendel hits uruk-hai for #ROYAL_BLUE#91.78 lightning damage#LAST#.
AI took for target 24289 uruk-hai :: 90 Grendel 9 < 400
[LOG] #00ff00#Talent Manathrust is ready to use.
[LOG] Grendel casts Flame.
USING table: 19C9DE80 Flame
163 frames in 10.028 seconds = 16.2545 FPS
[SPELL CRIT %] 4.8
Adding entity 24613 after 90
[PROJECTOR] starting dam 55.617305841247
[PROJECTOR] after difficulty dam 55.617305841247
[PROJECTOR] res 0 1 on dam 55.617305841247
[PROJECTOR] final dam 55.617305841247
[LOG] Grendel hits uruk-hai for #LIGHT_RED#55.62 fire damage#LAST#.
[LOG] Grendel killed uruk-hai!
602 ***
47 ticks in 10.751 seconds = 4.37169 TPS
[LOG] #00ff00#Talent Lightning is ready to use.
[LOG] #00ff00#Talent Flame is ready to use.
166 frames in 10.012 seconds = 16.5801 FPS
[SOUND] loading from /data/sound/actions/quaff.wav :=: userdata: 1B6B4428
[LOG] Grendel quaffs a potion of lesser healing!
destroy nil
[Identify] potion of lesser healing true
[LOG] You have #FFFFFF#11 potion of lesser healing#LAST#.
40 ticks in 11.518 seconds = 3.47283 TPS
[ATTACK] attacking with steel battleaxe
[COMBAT DAMAGE] power(1.345426) totstat(50.400000) talent_mod(1.000000)
[ATTACK] to Grendel :: 45.206303018087 2 0 :: 1
checkHit 20 15.35
=> chance to hit 66.583762469013
[ATTACK] raw dam 45.206303018087 versus 0 with APR 2
[ATTACK] after range 51
[PHYS CRIT %] 5
[ATTACK] after crit 51
[ATTACK] after mult 51
[PROJECTOR] starting dam 51
[PROJECTOR] after difficulty dam 51
[PROJECTOR] res 0 1 on dam 51
[PROJECTOR] final dam 51
[LOG] Uruk-hai hits Grendel for #aaaaaa#51.00 physical damage#LAST#.
[LOG] Icy wyrmic uruk-hai is into normal time.
removeTempVal invulnerable 1 :=: 3
delTmpVal invulnerable 1
uruk-hai 24291 dumb ai talents can use Crush 27
uruk-hai 24291 dumb ai talents can use Sunder Armour 60
dumb ai uses 60
[LOG] Uruk-hai uses Sunder Armour.
USING table: 1B38ED38 Sunder Armour
[TALENT WEAPON MULT] 2 1 1.5 0 1.3162277660168
[COMBAT DAMAGE] power(1.345426) totstat(50.400000) talent_mod(1.000000)
[ATTACK] to Grendel :: 45.206303018087 2 0 :: 1.3162277660168
checkHit 20 15.35
=> chance to hit 66.583762469013
[ATTACK] raw dam 45.206303018087 versus 0 with APR 2
[ATTACK] after range 49
[PHYS CRIT %] 5
[ATTACK] after crit 49
[ATTACK] after mult 64.495160534825
[PROJECTOR] starting dam 64.495160534825
[PROJECTOR] after difficulty dam 64.495160534825
[PROJECTOR] res 0 1 on dam 64.495160534825
[PROJECTOR] final dam 64.495160534825
[LOG] Uruk-hai hits Grendel for #aaaaaa#64.50 physical damage#LAST#.
checkHit 32 9
=> chance to hit 95
[LOG] Grendel resists the sundering!
[LOG] #00ff00#Talent Phase Door is ready to use.
[LOG] Grendel casts Phase Door.
USING table: 1B902FB0 Phase Door
127 frames in 10.052 seconds = 12.6343 FPS
48 ticks in 10.373 seconds = 4.6274 TPS
132 frames in 10.054 seconds = 13.1291 FPS
73 ticks in 10.926 seconds = 6.68131 TPS
147 frames in 10.063 seconds = 14.608 FPS
133 ticks in 10.012 seconds = 13.2841 TPS
96 frames in 10.039 seconds = 9.56271 FPS
[LOG] Grendel casts Phase Door.
USING table: 1B902FB0 Phase Door
60 ticks in 10.474 seconds = 5.72847 TPS
109 frames in 10.043 seconds = 10.8533 FPS
[LOG] Grendel casts Manaflow.
USING table: 13DBB558 Manaflow
[LOG] Grendel starts to surge mana.
addTmpVal mana_regen 4.9818425537374 :=: 0 411
39 ticks in 13.021 seconds = 2.99516 TPS
123 frames in 10.012 seconds = 12.2853 FPS
[LOG] Grendel quaffs a potion of lesser healing!
destroy nil
[Identify] potion of lesser healing true
[LOG] You have #FFFFFF#10 potion of lesser healing#LAST#.
134 frames in 10.052 seconds = 13.3307 FPS
39 ticks in 20.242 seconds = 1.92669 TPS
159 frames in 10.059 seconds = 15.8067 FPS
161 frames in 10.019 seconds = 16.0695 FPS
24 ticks in 20.129 seconds = 1.19231 TPS
159 frames in 10.014 seconds = 15.8778 FPS
105 frames in 10.049 seconds = 10.4488 FPS
72 ticks in 15.578 seconds = 4.6219 TPS
147 frames in 10.022 seconds = 14.6677 FPS
bind MOVE_DOWN function: 21E42D10
bind MOVE_UP function: 21E42CE8
bind EXIT function: 21E42D60
bind ACCEPT function: 21E42D38
28 ticks in 10.546 seconds = 2.65504 TPS
[LOG] #00ff00#Talent Phase Door is ready to use.
138 frames in 10.016 seconds = 13.778 FPS
[LOG] Grendel stops surging mana.
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 8:10 pm
by darkgod
13 FPS ?
Do you have some decent drivers for your video card installed ???
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 9:03 pm
by edge2054
The drivers are fine, it's just an old box.
But yeah, I haven't noticed any drop in fps in the logs when the game slows down and overall it's running better then beta 9 except when it's saving.
Also it seems like new characters run better. Like when I first start a new character the game runs great. But after awhile it seems to have gotten slower.
*edit* Then again maybe I have a memory leak. I just rebooted after double checking that my drivers are up to date and the game's running really good right now.
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 9:16 pm
by darkgod
Ah

Because yes beta10 should run FASTER than beta9 I spend a whole weekend optimizing it :/
As for lagging while saving yes, but then before you could not play at all
And trust me, on my core i7 930 it runs REAL neat

Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 9:47 pm
by madmonk
darkgod wrote:Ah

Because yes beta10 should run FASTER than beta9 I spend a whole weekend optimizing it :/
As for lagging while saving yes, but then before you could not play at all
And trust me, on my core i7 930 it runs REAL neat

Beta 9 runs faster than beta 10b for me... Haven't checked CPU usage or anything but it definitely runs slower and not by a small amount!
Re: consumes too much CPU when it should be idle
Posted: Mon Sep 06, 2010 9:58 pm
by darkgod
............... I'll go hang myself :<
When doing what ? running around ?
Also madmonk try to compile it it like that:
Code: Select all
premake4 --lua=jitx86 --force32bits gmake
make clean all
Obviously you need the 32bit compat libs but most distributions should have them.
Tell me if it's better