0

I just got an old laptop, and I am using it to run a minecraft server, just for the fun, but the problem is it only has got 2gbs of ram, I made a 20gb swap section, set swappiness to 100, but I still get my ram stuffed, and when I tested it with an heavy load, my ram still got filled and the laptop froze up, cant I say to a program or something to use swap only? Or atleast say it should use no more that x ammount of ram?

Thanks in advance

sys ubuntu 11.10 2ghz dual core 2gb ram

5
  • First off, running Minecraft on a low-spec system isnt a good idea :P It needs at least two gigs memory for a 10 person server when in full use. Secondly, Java doesn't exactly use Swap very well (Minecraft is a Java program)
    – Thomas Ward
    Jun 6, 2012 at 13:20
  • When it eats up all your RAM, its the problem. Minecraft is known to eat up RAM and Processor power. I once had a ten person MC server eat up 12GB of RAM and 5 out of 6 CPU cores for no reason, so...
    – Thomas Ward
    Jun 6, 2012 at 13:48
  • I know mc is inefficient, but I just want to transfer everything to my swap, I dont really care if its a little slower, minecraft is slow anyway.
    – Dr_Bunsen
    Jun 6, 2012 at 13:55
  • I don't think you can explicitly assign it to swap. That's what I'm saying.
    – Thomas Ward
    Jun 6, 2012 at 13:57
  • just found it, its indeed impossible. well thats that xD thanks anyways
    – Dr_Bunsen
    Jun 6, 2012 at 14:08

1 Answer 1

3
  • When you are running your ubuntu server are you running it with an X server? If possible dont just reinstall it and tell it to boot without X. It will save you lots of RAM. A headless server will run considerably smoother.
  • What command are you using to run your JVM (Java Virtual Machine) aka the Minecraft server. Specifying the correct amount of RAM in your command may save you trouble. You may be giving it to much.
  • Swap space wont help you with running a Minecraft server. HDD is just not fast enough to read off.

I run a Minecraft server off 2GB of RAM with 3 or 4 people its fine. If you can answer these questions I would be able to assist more. Also dual core is more plenty its just the RAM you are struggling with.

Bill

6
  • Hiya, Point 1: I am just running a stock ubuntu 11.10 with a desktop manager(I knew thats kinda useless, makes somethings just easier), I dont know about xserver, it says it has IO errors or something Point 2: I am using the standard command with some added ram, It runs with 4 on both the parameters. Point 3: Well I was going to use some usb sticks, bit those are slow too, so I was not shure, and I dont want to force too much IO actions on my usb sticks.
    – Dr_Bunsen
    Jun 6, 2012 at 13:44
  • 2
    What is the exact command you are using to start it? You need to set your install to run without desktop aka "X" This guide will help superuser.com/questions/102376/boot-ubuntu-without-x Swap in any form wont work i dont think with the JVM.
    – LinuxBill
    Jun 6, 2012 at 14:07
  • It won't. Java doesn't play well with Swap.
    – Thomas Ward
    Jun 6, 2012 at 14:11
  • java -Xmx 1536m -Xms 1536m -jar craftbukkit.jar (since I just editted the ammounts of ram because I just read that swap is not gonna work this way xD)
    – Dr_Bunsen
    Jun 6, 2012 at 14:11
  • Right there you go that's the problem you are giving your JVM 1.5GB of memory when you probably don't have that available. The OS will eat up probably around 700-1GB. So you wont have that much to give Minecraft. Try running Ubuntu without your desktop environment and you can save a lot of memory to give to your server.
    – LinuxBill
    Jun 6, 2012 at 14:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .