Icestorm causes massive CPU use spike

A place for people to post strange occurances that could be potential bugs.

Moderator: Board moderators

Post Reply
ToxicFrog

Icestorm causes massive CPU use spike

Post by ToxicFrog »

(This is also true of small/med/large snowstorm. Haven't had a chance to test their fire/chaos/holy equivalents yet.)
Server version, by the way, is the latest linux version from CVS.

Occasionally, casting Icestorm against large numbers of monsters causes massive slowdown - looking at a top for the server machine, the crossfire process goes from <0.1% CPU to >98%. The situation it was most noticeable in was in the pupland raffle1, in the first floor with the goblins. The procedure was something like this:
-open inner spikes
-run back, close outer door
-wait for goblins to build up
-open door, cast a few icestorms in, close door
-rinse and repeat until bored, then go in and finish the generators
At first, all was well; then, however, it started slowing down when I cast icestorm, and it got worse since.
It's most noticeable when casting so that the cone hits a wall rather than simply dissipating.
Also, the change isn't gradual; it'll go from normal to slow, and then at some later point drop back to normal in the space of a single tick.
There's a few possibilities I can think of:
-knockback. As more items are created as the goblins die, icestorm has much more stuff to knock back. I wouldn't think it would eat this much CPU time, though (it's a 2.66 GHz P4).
-icecubes. Perhaps it's re-wrapping the icecubes in more icecubes? If so, it probably shouldn't be, and I don't think this is what's happening. [EDIT] I went DM and looked at the icecubes. No, this isn't happening.
-some change in the cone propagation/spell collision code that makes it orders of magnitude less efficient for large cones than small ones? It's a level 7/pow 19/int 16 icestorm, and the spike seems to happen when it's at its largest.
-some combination of the above?

Exploring the room after clearing it, I found that the icecubes had tended to drift into lines at the edge of the range of my icestorm
ToxicFrog

Post by ToxicFrog »

Update: casting it against generators seems to exacerbate the effects, too. Trying it on the second floor (where it hits two rows of generators, one of zombies and one of skeletons) brought the server to a total halt for nearly ten minutes.
ToxicFrog

Post by ToxicFrog »

Well, I found out what's causing it.
At a certain point in the cone propagation, it creates a row of hundreds of stacked spell effects.
Quite apart from the CPU hit, this probably makes it much more damaging than it should be, too.
ToxicFrog

Apologies

Post by ToxicFrog »

Alright, just ignore this entire thread. Turns out I made a change that broke ok_to_put_more() and then forgot about it.
Post Reply