Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 38

Thread: KoLmafia using up lots of CPU

  1. #21
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,091

    Default

    Still learning my tools. A snapshot that didn't burn many adventures seemed to have Equipment Manager and some Java/Swing as hotspots. The script meat farming run definitely showed a slight increase in memory usage over time. It wasn't huge but it definitely looked like Ye Olden Times when memory was allocated and deallocated manually and there was no garbage collection and there was a "leak" in the code.

    P.S. I am running 64 bit Java and the OP's taskManager showed 32 bit so that might be a contributor.
    Last edited by fronobulax; 04-26-2018 at 03:22 PM. Reason: Add P.S.

  2. #22

    Default

    P.S. I am running 64 bit Java and the OP's taskManager showed 32 bit so that might be a contributor.
    Originally Posted by fronobulax View Post
    Bingo! I installed the 64 bit Java and now everything appears to be good and stable. It appears that I have a lot more memory now: https://i.imgur.com/CnZWuVg.png

    I will post here if the problem rears its head again. Otherwise, consider it solved

    Thanks to everyone for looking at my issue and taking the time to help me with it.

  3. #23
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,091

    Default

    Well. That is good to know.

  4. #24
    Developer
    Join Date
    Apr 2010
    Posts
    4,534

    Default

    So, is this not a bug, or do we need to say we only support Java 64 bit ?

  5. #25
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,091

    Default

    So, is this not a bug, or do we need to say we only support Java 64 bit ?
    Originally Posted by Darzil View Post
    I'm saying it is not a bug. I'm also thinking that we support Java and it is not our problem if someone's hardware and OS do much better with x64 than with x32.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  6. #26

    Default

    32-bit software can only use numbers as large as 2^32. That includes memory addressing, so 32-bit programs can only directly access up to 4GiB of RAM.

    64-bit software, on the other hand, can work with numbers up to 2^64. That means the theoretical maximum amount of RAM it can use is 17180000000GiB. This is generally considered Enough.

    Moral of the story: stop using 32-bit software. Blame Microsoft for the continued prevalence of it in the Windows ecosystem.

  7. #27

    Default

    KoLmafia definitely uses more CPU than I would expect it to, but that is just a result of using Java. Java is inefficient, so that’s par for the course unfortunately. I love programming in it, but I hate running it.

    I’m sure there are a bunch of idling optimizations that could be made, but I’m certainly not familiar enough with KoLmafia’s code to contribute much there.

  8. #28
    Junior Member
    Join Date
    Apr 2011
    Posts
    15

    Default

    So I noticed this happening to me as well and I tried to find stuff out. When running a script with mafia normally I use at most ~15% CPU, but when I have the gCLI open I always use 25%, it doesn't even need to be a script that's doing anything. Here's a wait command: https://i.imgur.com/dnV0ndj.png

    Also here is the same thing except I clicked off the gCLI to the adventure pane: https://i.imgur.com/Yefu0fq.png
    All CPU usage dropped off even though the "script" is still running and you can also see by the pics the memory is fine. Something funky is going on with the gCLI and I don't think it is "just java things".

  9. #29
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,091

    Default

    I don't think it is "just java things".
    Originally Posted by finaltidus View Post
    Then what do you think it is and, more importantly, what do you expect someone to do about it?
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  10. #30
    Junior Member
    Join Date
    Apr 2011
    Posts
    15

    Default

    Then what do you think it is and, more importantly, what do you expect someone to do about it?
    Originally Posted by fronobulax View Post
    I didn't write the code, why would I know what's wrong with it? I just would expect it to be a bigger issue than "who knows whats wrong, it's not a bug just deal with it" when something is obviously wrong with it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •