Mafia running 120352 kb.... lag city

What do I need to do to fix this? It's only on my multi, not my main. I have no idea what's going on :( Any help is appreciated. When it gets bad like it did just now I can't even close it it's so slow. I have to force quit it and wait until my computer cools down before trying it again. I'm on a year old macbook pro so I know it's not a hardware issue lol.
 
Last edited:

fronobulax

Developer
Staff member
What is your multi doing (in game terms) that other character are not? Do you have a JDK installed or just a JRE. If the former then there might be some easy diagnostics. Are you running multiple characters at once or just one at a time? Are you quoting mafia's counter or an operating system utility? Can you press the Collect Garbage button and see any change in usage?
 
Multi is only doing castle. Nothing special, level 25 with just a normal attack. What is JDK and JRE? What does collect garbage even do? I've googled it a few times and can't ever find any answers.
 

Winterbay

Active member
Collect Garbage is a way to tell mafia to release the memory it has reserved for itself and that may not be needed anymore. It sometimes help when Mafia slows down due to potential memory leaks and such.
 

slyz

Developer
On the Mafia interface, click on the clock on the right of the "memory bar", at the top. It tells Mafia to do garbage collecting. Or you can simply type "gc" in the gCLI.
 

fronobulax

Developer
Staff member
JDK is Java Development Kit and JRE is Java Runtime Environment. The former allows you to create applications that use Java. The latter just allows you to run applications. Part of using the jargon was deliberate - it helps calibrate your level of knowledge and allows answers to be tuned to what you may already know or have installed. You got a garbage collection explanation above so I hope you are good with that. Off the top of my head there is no reason while Castle farming should take any more memory than anything else. We probably need to throw something at your system to see what is using all of the memory.
 
How do I find out where all the memory is going? I don't do anything else while playing and my system manager shows 99% of my computer is being used by mafia (the 99% is the percentage of the computer usage, not 99% of the computers ability).
 

xKiv

Active member
You don't, unless you are a java black wizard. It's not as simple[1] as attaching a debugger and inspecting all variables.
For starters, there are the various generations with different behavior ... (and without going deeper into it, just allowing java to allocate more memory for heap will make it allocate more memory for the younger generations, and that's memory you can't unallocate - and there are options controlling how soon, how much, etc - and just having a more modern computer can make java allocate more memory by default, and ...)
It's scary.
No, I am not an expert on that.

[1] for values of simple including several days (months?) of reading mind-numbing printouts
 

lostcalpolydude

Developer
Staff member
Without a JDK installed, you can still try "greygui force" to see if it closes any open threads and frees up a bunch of memory. It will print out an error-like message, but it will still do the not-examining-open-threads stuff.
 

Catch-22

Active member
Dunno why everyone's off-track about memory usage, your issue sounds like processor utilization. If your computer becomes unresponsive, it's probably because you're using 99% of the CPU (I'm no MacBook aficionado but last I checked 120mb memory usage wouldn't be 99% of the RAM :)). If you're literally having to wait for your computer to "cool down", it's not because the RAM is getting hot, haha.

Anyway, are you always running your multi after your main? I've experienced high CPU usage before from rogue java processes that haven't closed properly. What I would suggest you do is remove any old versions of Java you might be running, and install a fresh copy of the JRE (I don't recommend the JDK if you're not a developer). Download the latest build of Mafia and have another crack at it.

Let us know how you go!
 
No, I usually play the multi right before rollover, and my main about an hour after rollover so there is about a 2 hour period between. Also, I have no idea what Java is :confused:
 

Theraze

Active member
Catch-22, we're focusing on memory because if you look at the thread title, i_eat_food has brought the conversation to memory usage... CPU usage has only tangentially been mentioned in post 7 and not using the 'right' terminology still. So we're assuming that 99% of utilization is of CPU, not memory... which it might still be.

Basically, for us to troubleshoot i_e_f's problems, we need accurate information. Without screenshots or using accurate terms, we can only guess. :)
 

Theraze

Active member
Probably the system manager showing mafia using 99% of resources. You specifically said it was using 99% of memory there by asking where the memory was going, but if it's sticking around the 120mb you stated initially, that sounds... wrong. Hence Catch-22's assumption you were talking about processing power. A screenshot vindicates your request and lets us know that's definitely what's going on. :)
 
file-33.jpg




file-32.jpg




file-31.jpg
 
Top