Author Topic: Increasing megamek ram  (Read 4567 times)

Saboe

  • Recruit
  • *
  • Posts: 9
Increasing megamek ram
« on: 19 May 2017, 23:45:50 »
 I recently downloaded the new version of mekhq/megamek. But I am unable to increase the -Xmx1024m in the megamek.l4j file as I have in the past.  I have 64 bit java but any change in the number and megamek will not launch. Has something changed with the game or is my problem elsewhere? Thanks.

JenniferinaMAD

  • Warrant Officer
  • *
  • Posts: 492
Re: Increasing megamek ram
« Reply #1 on: 20 May 2017, 02:46:01 »
I take it you are not assigning more memory than your system has and that you've installed 64bit java in a way that leaves no version conflicts.

Only other thing I can think of is that the editor you're using to save the file after making the change also changes something in the file format. It's not changing it to megamek.l4j.txt or something, is it?

Saboe

  • Recruit
  • *
  • Posts: 9
Re: Increasing megamek ram
« Reply #2 on: 20 May 2017, 09:12:31 »
It is a brand new computer with 32GB Ram.  Using 2048, 3072, both prevent the game from launching. I have been using notepad to change it back and forth which is the same way I have done it before. I guess if it still works for everyone else the next thing would be to delete my java and see if something in it is wrong there.  Thanks for the reply.

Hammer

  • Numerorum Malleo
  • Global Moderator
  • Major
  • *
  • Posts: 4134
    • MegaMek Website
Re: Increasing megamek ram
« Reply #3 on: 20 May 2017, 09:59:12 »
Is there anything in the log file?
MegaMek Projects Wiki
Bug Trackers
MegaMek Tracker
MekHQ Tracker
MegaMekLab Tracker
New Units and RAT's aren't added until after the 2 month release moratorium is passed.
Join the official MegaMek Discord

Saboe

  • Recruit
  • *
  • Posts: 9
Re: Increasing megamek ram
« Reply #4 on: 20 May 2017, 23:21:22 »
 I did not think to look. But it must have been something to do with my Java. I deleted it and reinstalled and everything seems to be fine now..

JenniferinaMAD

  • Warrant Officer
  • *
  • Posts: 492
Re: Increasing megamek ram
« Reply #5 on: 21 May 2017, 18:28:57 »
That's good to hear :)

Happy gaming!

Drifter

  • Corporal
  • *
  • Posts: 69
Re: Increasing megamek ram
« Reply #6 on: 12 June 2017, 13:40:51 »
I have tried on windows 10 and server 2012 to adjust the ram to anything other then 1024 and it crashes with 43.2

Drifter

  • Corporal
  • *
  • Posts: 69
Re: Increasing megamek ram
« Reply #7 on: 12 June 2017, 19:58:52 »
Hey guys so I figured out what the root cause of the issue.  IF you have windows 10 you cant use the EDGE browser to download Java as it will break features due to EDGE being hostile to java.   So just go to the option that allows you to install Java on multiple PCs (the 65 meg download) and save that to your pc and run the install with the browsers closed and that solves the issue.

RexfelisLXIX

  • Recruit
  • *
  • Posts: 2
Re: Increasing megamek ram
« Reply #8 on: 13 June 2017, 17:24:38 »
@Drifter Very good info to have. Thanks for sharing.

ThePW

  • Lieutenant
  • *
  • Posts: 1208
  • One post down, a thousand to g... Oh we're here?
Re: Increasing megamek ram
« Reply #9 on: 01 August 2020, 19:42:18 »
is this still a valid fix? especially when you consider the new version of window's edge (the only with the blue-green wave icon)?

my main grief is typing to run scenarios and sometimes it stalls for more than 5-20 mins on a bot move...
Even my Page posting rate is better than my KPD rate IG...

2Feb2023: The day my main toon on DDO/Cannith, an Artificer typically in the back, TANKED in a LH VoD.

Hammer

  • Numerorum Malleo
  • Global Moderator
  • Major
  • *
  • Posts: 4134
    • MegaMek Website
Re: Increasing megamek ram
« Reply #10 on: 01 August 2020, 20:08:17 »
is this still a valid fix? especially when you consider the new version of window's edge (the only with the blue-green wave icon)?

my main grief is typing to run scenarios and sometimes it stalls for more than 5-20 mins on a bot move...
The web browser doesn't impact this.  The big part of this depends of what version of Java your using.

Go to the command prompt
Type "java -version" and press enter
If you are running Java 64-bit the output should include "64-Bit"
Keep in mind that you may have multiple versions of Java installed on your system.

To increase memory for Megamek look for the file called MegaMek.l4j.ini in the folder.  Inside look for a line that says -Xmx1024m and change that to -Xmx2048m.

Depending on how much RAM you have with determine who much that second number can be. If you have 16 gig you should be able to away with -Xmx4096m


MegaMek Projects Wiki
Bug Trackers
MegaMek Tracker
MekHQ Tracker
MegaMekLab Tracker
New Units and RAT's aren't added until after the 2 month release moratorium is passed.
Join the official MegaMek Discord

ThePW

  • Lieutenant
  • *
  • Posts: 1208
  • One post down, a thousand to g... Oh we're here?
Re: Increasing megamek ram
« Reply #11 on: 01 August 2020, 20:15:22 »
Do you have to do that for both the files (Megamek & MHQ)? i search from the main directory that i DLed the entire program, i see two files that deal with either MM or MHQ... i edited both as instructed...
Even my Page posting rate is better than my KPD rate IG...

2Feb2023: The day my main toon on DDO/Cannith, an Artificer typically in the back, TANKED in a LH VoD.

Hammer

  • Numerorum Malleo
  • Global Moderator
  • Major
  • *
  • Posts: 4134
    • MegaMek Website
Re: Increasing megamek ram
« Reply #12 on: 01 August 2020, 20:52:45 »
Do you have to do that for both the files (Megamek & MHQ)? i search from the main directory that i DLed the entire program, i see two files that deal with either MM or MHQ... i edited both as instructed...
You can but Megamek is the more important one.
MegaMek Projects Wiki
Bug Trackers
MegaMek Tracker
MekHQ Tracker
MegaMekLab Tracker
New Units and RAT's aren't added until after the 2 month release moratorium is passed.
Join the official MegaMek Discord

elf25s

  • Major
  • *
  • Posts: 4427
Re: Increasing megamek ram
« Reply #13 on: 01 August 2020, 22:06:41 »
ok i know yu may not want to hear this but disabling simultanius movement and firing phases can disable the lag and hanging issues
you sure cannot out run death...but sure as hell you can make that bastard work for it!

ThePW

  • Lieutenant
  • *
  • Posts: 1208
  • One post down, a thousand to g... Oh we're here?
Re: Increasing megamek ram
« Reply #14 on: 01 August 2020, 22:54:59 »
ok i know yu may not want to hear this but disabling simultanius movement and firing phases can disable the lag and hanging issues

Is that an option that's normally set up? How do you turn it off? Normally it tells me the order of initiative on the White screens, both in the dice rolls and the actual order (me, me, you, you, him, him, him, me, him, you, etc.)
Even my Page posting rate is better than my KPD rate IG...

2Feb2023: The day my main toon on DDO/Cannith, an Artificer typically in the back, TANKED in a LH VoD.

elf25s

  • Major
  • *
  • Posts: 4427
Re: Increasing megamek ram
« Reply #15 on: 02 August 2020, 15:23:42 »
Is that an option that's normally set up? How do you turn it off? Normally it tells me the order of initiative on the White screens, both in the dice rolls and the actual order (me, me, you, you, him, him, him, me, him, you, etc.)
ots in mega mek section in options in hq and megamek
normally it is off. but if you turn those on other than deployment phase it will either lag the princes/bot or just freeze. i found the hard way that as long as you have simultanious movement and attack/fireing/physical phase it can either freeze or lag the game no matter how much ram you allocate to megmek/mekhq
you sure cannot out run death...but sure as hell you can make that bastard work for it!