"You are running low on memory" o_o - 32Gb allocated

    Joined
    Sep 29, 2013
    Messages
    91
    Reaction score
    0
    • Legacy Citizen
    So, I've been getting issues (like http://star-made.org/content/unknownfaction-1-instead-pirate) since the last update. I'll be listing each individually, so each can get it's own attention.

    For this one:

    "WARNING! You are running low on memory! Please increase the max value in the StarMade-Launcher"

    This is interesting for me. I have a power system - well above what most would use. And of my RAM, I have a whole 32Gb allocated to StarMade (post launcher) to enable things like admin-side jumping around to different sectors or moving entire stations to new places.

    How is StarMade even using that? I've been flying from sector to sector (empty sectors, at that) doing mapping for my server... and have covered 10 sectors so far.
     
    Joined
    Sep 1, 2013
    Messages
    4
    Reaction score
    0
    • Legacy Citizen
    It is likely because you are allocatign ALL the RAM in your PC to Star Made, thus leaving little to none for your OS. Most programs when you alocate RAM to them they take all of it and keep it, only a few that are programed specifically to release it when not needed won\'t do that.



    So the easy fix here is only allocate about 28GB (leave 2 for your OS to run smoothly)
     
    Joined
    Sep 10, 2013
    Messages
    71
    Reaction score
    0
    @ECHO OFF
    SET BINDIR=%~dp0
    CD /D \"%BINDIR%\"
    java.exe -Xmx(total ram for game)G -Xms(starting amount)G -jar starmade.jar -client

    Anyways he shouldn\'t be able to run out of ram, since the pagefile/swapfiles exist to facilitate more ram usage than is availible in system memory.

    The other possiblity is that your system is reaching the maximal ammount of java heap space, and the garbage collector cannot keep up. Something like -XX:+UseDynamicNumberOfGCThreads ?XX:+UseConcMarkSweepGC might help prevent the program from maxing out it\'s own memory so quickly

    http://java-is-the-new-c.blogspot.com/2013/07/tuning-and-benchmarking-java-7s-garbage.html
     
    Joined
    Sep 29, 2013
    Messages
    91
    Reaction score
    0
    • Legacy Citizen
    Don\'t think I\'m that silly. That\'s only half my RAM, and my OS is plenty fed. So no, that\'s not an \'easy fix\'.
     
    Joined
    Sep 29, 2013
    Messages
    91
    Reaction score
    0
    • Legacy Citizen
    Aye, the java controls would help, but the issue\'s only since last patch, and it\'s not an actual out-of-memory. It\'s more than likely the game reporting that it\'s exceeded the initial memory allocation.
     
    Joined
    Jun 21, 2013
    Messages
    2
    Reaction score
    0
    how do i increase the ram that goes to starmade from the launcher?
     

    therimmer96

    The Cake Network Staff Senior button unpusher
    Joined
    Jun 21, 2013
    Messages
    3,603
    Reaction score
    1,053
    Dont worry about this. It is just a bug that everyone is seeing.
     
    Joined
    Oct 15, 2013
    Messages
    76
    Reaction score
    5
    If it was, everybody would probably commenting on this forum \'I got this too!\'. Even if it isn\'t, a least I\'m seeing it. I tried increasing the maximum like it said but it was used really fast.
     
    Joined
    Jun 21, 2013
    Messages
    2
    Reaction score
    0
    Ok then. I think I know why its happening though. I just restarted my universe. I was flying to a planet and looked in navigation. The navigation had about 200 pirate ships. I flew towrd them. When I got near my game started lagging like crazy. It looked like there were a thousand ships there. Then my game crashed...
     
    Joined
    Aug 15, 2013
    Messages
    12
    Reaction score
    0
    Increaseing the initial RAM will fix this.

    Based on the amount you have I would set the max to around 8Gb and the initial to 6Gb. (I have my initial set to 2Gb and I never see this message)
     

    Reilly Reese

    #1 Top Forum Poster & Raiben Jackpot Winner
    Joined
    Oct 13, 2013
    Messages
    5,140
    Reaction score
    1,365
    • Legacy Citizen 8
    • Thinking Positive
    • Purchased!
    I keep getting this. Allocated more memory but just ate it up and asked for more only started recently.
     
    Joined
    Oct 15, 2013
    Messages
    76
    Reaction score
    5
    The memory is in MB, not Gb (at least for me). Because of that, do you know how many MB 2, 6, and 8 Gb would equal?
     
    Joined
    Aug 23, 2013
    Messages
    379
    Reaction score
    65
    Hi,

    1 GB is probably 1024 MB; so 8 GB would probably be 8192 MB.

    Technical note: Strictly speaking; 1 GB is 1000 MB, and 1 GiB is 1024 MiB, and \'B\' is bytes and \'b\' is bits. Most correctly; 8 Gb is 1 GB (as there are 8 bits in a byte), which is 1000 MB or 953.67 MiB. Sadly, even programmers get it wrong (poor training and/or bad habits) so often MB is used to mean MiB.
     

    FlyingDebris

    Vaygr loves my warhead bat.
    Joined
    Sep 6, 2013
    Messages
    2,458
    Reaction score
    1,312
    • Top Forum Contributor
    • Councillor Gold
    • Legacy Citizen 4
    No message shown before update= no problem.

    Message shown after update, but nothing has really changed= no problem.

    Tl;dr- ignore it, it\'s a glitch. I\'m running off of a 2GB RAM unit, and I\'m fine... sorta. So, for anyone with more than 2GB, there is nothing to worry about, trust me.
     

    Kir

    Joined
    Oct 29, 2013
    Messages
    3
    Reaction score
    0
    • Legacy Citizen
    It looks like standart java garbage collector issue, being agressively complained by game engine. Java VM will use ALL the memory accessible, deallocating garbage only then there is no room.
     

    mou

    Joined
    Jul 1, 2013
    Messages
    179
    Reaction score
    2
    and I m not able to launch the game anymore

    (before last update game was running fine)
     
    Joined
    Aug 10, 2013
    Messages
    290
    Reaction score
    366
    It doesn\'t matter how much memory you give it though;

    The game keeps spawning and tracking AI ships, even where you don\'t see them. Over time, there\'ll be enough to cause a slowdown, and make that message pop up on any system.

    To make it worse, if by accident or purpose, the traders and pirates have access to bigger ships than the basic isanth, it\'ll take far less of them to break your game.

    For example; I was super careful, and made sure npcs can\'t spawn any of my blueprints, only the isanth. After a week of playing in that same universe, my game started slowing down, badly.

    Temporary fix;

    I opened up the server_database folder in SM\'s install directory, and manually deleted several hundred AI ships, both from there and one folder deeper in \"DATA\". It\'s an incredible waste of computing power; for all those hundreds of ships, I\'m sure I haven\'t met more than 20 traders, and always made sure to find and completely destroy any and all pirates.

    You don\'t need to worry about accidentally deleting your own ships by the way; Any AI ship\'s name starts with \"ai_ship\" + blueprint name + ID number. They\'re easily recognisable.

    Lo and behold, on the next startup the game booted swiftly and there was no lag.

    So I decided to disable pirates and traders completely. I\'ll turn them on if I want to go hunting, then delete the database again, because far more will spawn than you\'ll see.

    But it wasn\'t over yet. Some time later I accidentally left one of my partially done backup-blueprints available for traders. It\'s a hollow hull of a 600 blocks long battleship. I have played perhaps for half an hour when the game became unplayable and the message about memory popped up. I shut down the game, checked the database, and there was SIX ai ships with it\'s name. That was enough to kill the game, even though they weren\'t even in radar distance.

    And that is our mysterious slowdown over time bug.