Mafia seems to have become a resource hog for me

jwylot

Member
I have noticed that mafia has started using more and more resources in recent weeks. I haven't seen this mentioned anywhere and was wondering if this is just happening to me or if anyone else is seeing the same. It also seems to impact on Firefox when running the relay browser to the point that FF stops responding regularly.

I'm guessing that this is just something peculiar to my setup and I would welcome suggestions of what I should be looking at to identify the problem.

Thanks for listening.
 

Veracity

Developer
Staff member
Explain what you mean by "mafia has started using more and more resources". It is using more memory? It is using more CPU? Exactly which "resources" are you talking about - and how are you telling that it is "using" them? Is your process monitor showing that KoLmafia is consistently using 50% of your CPU?

Now, in regards to browser interaction, I notice that when I run my daily turns in the Relay Browser in Safari, Safari gets slower and slower. KoLmafia itself is not using more memory or more of the CPU; Safari is slowing down. If I quit Safari and restart it and connect again from KoLmafia, Safari is speedy again. To me, this looks like a memory leak or something in Safari.

As we all know, Firefox never has memory leaks. So, if Firefox is slowing down for you, too, that is surely a coincidence. Or not.

As I said, I am not seeing the KoLmafia process itself use an undue amount of memory or CPU. I wonder what it's doing to provoke browsers to misbehave?

(Is this happening to anyone else?)
 

jwylot

Member
When I autoadventure, I'm seeing around 25% CPU usage on an i5 4-core 2.4GHz windows laptop with 6GB of ram. If I'm using chat, while autoadventuring, mafia will regularly stop responding for a second or two which I put down to CPU strain. I haven't noticed a memory issue but will watch out for that tomorrow.

The relay browser thing is odd. I know FF is notorious for memory leaks and at one time restarting it used to solve the problem but this the behaviour I'm seeing now is different. I never used to get "not responding" before and usually I have to restart both mafia and FF to get some respite. I only get this behaviour when adventuring in the relay browser by the way. Normally it starts with increasing waits for 127.0.0.1 and when it gets really bad, FF greys out with "not responding" in the top bar for a few seconds.

I'm not terribly technical but if there's anything I could try to pin down the problem I'll gladly give it a go.
 

Theraze

Active member
I used to have issues with Firefox, which was why I switched to the 64-bit version of Internet Explorer. Personally I placed the blame for the relay browser slowness on Firefox though, not mafia.
 

Theraze

Active member
Two questions for jwylot... one, any extensions and/or GM scripts that are out of the ordinary (I don't count AdBlock in this, since anyone using FF is probably using it). Second... have you tried Waterfox? It's a 64-bit optimized version of Firefox that uses your regular profile, so it doesn't take reinstalling your profile or anything else odd. My memory/speed in FF got significantly better once I swapped.

But my guess is that you probably have some GM script or extension that's causing the problem, if it's not the standard issue that happens with FF when you try to run with 100+ tabs open. :D
 

Catch-22

Active member
Your KoLmafia/Java installation is screwy. If it's using 25% CPU on a quad-core, that's 100% of one core. It shouldn't be doing that.

Uninstall all versions of Java completely, then install the latest. I suggest the JRE unless you have specific needs for the JDK. Download the latest KoLmafia JAR from builds.kolmafia.us.

Firefox is a different beast altogether. I believe the non-responsiveness of Firefox may be related to a rogue addon. My suggestion for you is to create a new profile and try running your relay browser through the new profile with no addons enabled, see if you get the same issue.
 

jwylot

Member
Thanks for your suggestions. I'll try reinstalling Java as a first step to see if that helps with the CPU issue then I'll try running a vanilla FF. I'll report back.
 

jwylot

Member
Thanks for your suggestions. I'll try reinstalling Java as a first step to see if that helps with the CPU issue then I'll try running a vanilla FF. I'll report back.

Sheepishly admits that windows had somehow switched his processor to a power-saving mode which was causing the CPU issue. Clearing FF cache completely and installing Waterfox has cured the relay browser thing too. Thank you guys, you're awesome.
 
Top