RAM Issue. - Possible Memory Leak?

Discussion in 'Bukkit Help' started by Obliviator, Jun 10, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Obliviator

    Heyy,

    Not sure how to start this so Ill just jump into it.

    I define a MAX of 6GB RAM for my server, have it started on 4GB.
    It still has an allocated 4GB of RAM (4096M) in minecraft (checked with essentials /gc)

    Although, the RAM that is free for the entire OS, is around 200MB.

    Code:
    18:57:16 [INFO] Maximum memory: 6,144 MB
    18:57:16 [INFO] Allocated memory: 4,096 MB
    18:57:16 [INFO] Free memory: 1,212 MB
    Code:
                total      used      free    shared    buffers    cached
    Mem:      8191940    8035308    156632          0    113252    125204
    
    (Here it is ~156MB free)

    Running:
    8GB RAM
    Ubuntu 11.10
    All Versions of Craftbukkit have done this to me.
    Running Remote Toolkit a13

    Cutouts of Remote Toolkits Config:
    Code:
    maximum-heap-size=6G
    initial-heap-size=4G
    extra-runtime-arguments=-Djline.terminal\=jline.UnsupportedTerminal, -server, -d64, -XX\:+UnlockExperimentalVMOptions, -XX\:+UseG1GC, -XX\:+UseLargePages, -XX\:UseSSE\=3, -XX\:PermSize\=128m, -XX\:MaxPermSize\=256m
    Will provide more information on request.

    Thanks.
     
  2. Offline

    kubaku4

    ps aux
     
  3. Offline

    andrewpo

    As the previous poster stated, please run the "ps aux" command in your UNIX terminal and post the output here (preferably wrapped in code tags).​
    Thanks.​
     
  4. Offline

    Obliviator

    Code:
    root@auscraft:~# ps aux
    USER      PID %CPU %MEM    VSZ  RSS TTY      STAT START  TIME COMMAND
    root        1  0.0  0.0  24056  808 ?        Ss  01:59  0:01 /sbin/init
    root        2  0.0  0.0      0    0 ?        S    01:59  0:00 [kthreadd]
    root        3  0.0  0.0      0    0 ?        S    01:59  0:04 [ksoftirqd/0]
    root        4  0.0  0.0      0    0 ?        S    01:59  0:00 [kworker/0:0]
    root        5  0.0  0.0      0    0 ?        S    01:59  0:00 [kworker/u:0]
    root        6  0.0  0.0      0    0 ?        S    01:59  0:00 [migration/0]
    root        7  0.0  0.0      0    0 ?        S    01:59  0:00 [migration/1]
    root        8  0.0  0.0      0    0 ?        S    01:59  0:00 [kworker/1:0]
    root        9  0.0  0.0      0    0 ?        S    01:59  0:04 [ksoftirqd/1]
    root        10  0.1  0.0      0    0 ?        S    01:59  2:10 [kworker/0:1]
    root        11  0.0  0.0      0    0 ?        S    01:59  0:00 [migration/2]
    root        12  0.0  0.0      0    0 ?        S    01:59  0:00 [kworker/2:0]
    root        13  0.0  0.0      0    0 ?        S    01:59  0:02 [ksoftirqd/2]
    root        14  0.0  0.0      0    0 ?        S    01:59  0:00 [migration/3]
    root        16  0.0  0.0      0    0 ?        S    01:59  0:03 [ksoftirqd/3]
    root        17  0.0  0.0      0    0 ?        S<  01:59  0:00 [cpuset]
    root        18  0.0  0.0      0    0 ?        S<  01:59  0:00 [khelper]
    root        19  0.0  0.0      0    0 ?        S<  01:59  0:00 [netns]
    root        20  0.0  0.0      0    0 ?        S    01:59  0:00 [kworker/u:1]
    root        21  0.0  0.0      0    0 ?        S    01:59  0:00 [sync_supers]
    root        22  0.0  0.0      0    0 ?        S    01:59  0:00 [bdi-default]
    root        23  0.0  0.0      0    0 ?        S<  01:59  0:00 [kintegrityd]
    root        24  0.0  0.0      0    0 ?        S<  01:59  0:00 [kblockd]
    root        25  0.0  0.0      0    0 ?        S<  01:59  0:00 [ata_sff]
    root        26  0.0  0.0      0    0 ?        S    01:59  0:00 [khubd]
    root        27  0.0  0.0      0    0 ?        S<  01:59  0:00 [md]
    root        28  0.1  0.0      0    0 ?        S    01:59  2:10 [kworker/1:1]
    root        29  0.0  0.0      0    0 ?        S    01:59  0:04 [kworker/2:1]
    root        30  0.0  0.0      0    0 ?        S    01:59  0:05 [kworker/3:1]
    root        61  0.0  0.0      0    0 ?        S    01:59  0:00 [khungtaskd]
    root        62  0.0  0.0      0    0 ?        S    01:59  0:52 [kswapd0]
    root        63  0.0  0.0      0    0 ?        S    01:59  0:40 [kswapd1]
    root        64  0.0  0.0      0    0 ?        SN  01:59  0:00 [ksmd]
    root        65  0.0  0.0      0    0 ?        SN  01:59  0:00 [khugepaged]
    root        66  0.0  0.0      0    0 ?        S    01:59  0:00 [fsnotify_mark]
    root        67  0.0  0.0      0    0 ?        S    01:59  0:00 [ecryptfs-kthrea]
    root        68  0.0  0.0      0    0 ?        S<  01:59  0:00 [crypto]
    root        76  0.0  0.0      0    0 ?        S<  01:59  0:00 [kthrotld]
    root      274  0.0  0.0      0    0 ?        S    01:59  0:00 [cciss_scan]
    root      293  0.0  0.0      0    0 ?        S<  01:59  0:00 [kdmflush]
    root      311  0.0  0.0      0    0 ?        S<  01:59  0:00 [kdmflush]
    root      324  0.5  0.0      0    0 ?        D    01:59  5:58 [jbd2/dm-0-8]
    root      325  0.0  0.0      0    0 ?        S<  01:59  0:00 [ext4-dio-unwrit]
    root      384  0.0  0.0  17236  168 ?        S    01:59  0:00 upstart-udev-bridge --daemon
    root      389  0.0  0.0  21456  312 ?        Ss  01:59  0:00 udevd --daemon
    root      469  0.0  0.0      0    0 ?        S<  01:59  0:00 [edac-poller]
    root      494  0.0  0.0  21268  196 ?        S    01:59  0:00 udevd --daemon
    root      495  0.0  0.0  21536  180 ?        S    01:59  0:00 udevd --daemon
    root      502  0.0  0.0      0    0 ?        S<  01:59  0:00 [ttm_swap]
    root      507  0.0  0.0      0    0 ?        S<  01:59  0:00 [kpsmoused]
    root      662  0.0  0.0  15056    4 ?        S    01:59  0:00 upstart-socket-bridge --daemon
    root      677  0.0  0.0      0    0 ?        S    01:59  0:00 [kworker/3:2]
    root      711  0.0  0.0  49692  568 ?        Ss  01:59  0:01 /usr/sbin/sshd -D
    syslog    720  0.0  0.0 118416  436 ?        Sl  01:59  0:08 rsyslogd -c5
    102        731  0.0  0.0  24160  156 ?        Ss  01:59  0:00 dbus-daemon --system --fork --activation=upstart
    root      802  0.0  0.0  4188  240 tty4    Ss+  01:59  0:00 /sbin/getty -8 38400 tty4
    root      809  0.0  0.0  4188  244 tty5    Ss+  01:59  0:00 /sbin/getty -8 38400 tty5
    root      812  0.0  0.0  4188  240 tty2    Ss+  01:59  0:00 /sbin/getty -8 38400 tty2
    root      813  0.0  0.0  4188  240 tty3    Ss+  01:59  0:00 /sbin/getty -8 38400 tty3
    root      816  0.0  0.0  4188  244 tty6    Ss+  01:59  0:00 /sbin/getty -8 38400 tty6
    root      824  0.0  0.0  15856  364 ?        Ss  01:59  0:13 /usr/sbin/irqbalance
    root      831  0.0  0.0  18984  420 ?        Ss  01:59  0:00 cron
    daemon    832  0.0  0.0  16784  168 ?        Ss  01:59  0:00 atd
    mysql      835  0.4  0.3 309060 27040 ?        Ssl  01:59  4:55 /usr/sbin/mysqld
    root      888  0.0  0.0 125624  792 ?        Ss  01:59  0:02 /usr/sbin/apache2 -k start
    root      922  0.0  0.0  4188  244 tty1    Ss+  01:59  0:00 /sbin/getty -8 38400 tty1
    root      950  0.0  0.0      0    0 ?        S    01:59  0:31 [flush-252:0]
    root      1154  0.0  0.0  27292  1152 ?        Ss  02:04  0:02 SCREEN -S mc /minecraft/rtoolkit.sh
    root      1155  0.0  0.0  14364  260 pts/1    Ss+  02:04  0:00 /bin/bash /minecraft/rtoolkit.sh
    root      1159  0.0  0.0  14364    4 pts/1    S+  02:04  0:00 /bin/bash /minecraft/rtoolkit.sh
    root      1160  0.0  0.2 310568 23248 pts/1    Sl+  02:04  0:52 java -Xmx30M -Xms30M -XX:MaxPermSize=40M -jar Minecraft_RKit.jar user:pass
    root      1674  0.0  0.0  18036  1204 pts/0    R+  21:04  0:00 ps aux
    root    10967  0.0  0.0  73264  1652 ?        Ss  17:53  0:01 sshd: root@notty
    root    11008  0.0  0.0  12776  580 ?        Ss  17:53  0:01 /usr/lib/openssh/sftp-server
    root    16001  0.0  0.0  73232  1460 ?        Ss  18:32  0:00 sshd: root@notty
    root    16037  0.0  0.0  73212  1752 ?        Ss  18:32  0:00 sshd: root@pts/0
    root    16044  0.0  0.0  12648  320 ?        Ss  18:32  0:00 /usr/lib/openssh/sftp-server
    root    16091  0.0  0.0  24984  3060 pts/0    Ss  18:32  0:00 -bash
    root    28368  148 53.9 7726348 4420304 pts/1 Sl+  20:10  80:13 java -Xms4G -Xmx6G -Djline.terminal=jline.UnsupportedTerminal -server -d64 -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:+UseLargePages -XX:UseSSE=3 -XX:PermSize=128m -
    www-data 28594  0.0  0.0 125648  476 ?        S    15:47  0:00 /usr/sbin/apache2 -k start
    www-data 32449  0.0  0.0 126080  760 ?        S    06:25  0:00 /usr/sbin/apache2 -k start
    www-data 32450  0.0  0.0 126088  804 ?        S    06:25  0:00 /usr/sbin/apache2 -k start
    www-data 32451  0.0  0.0 125648  340 ?        S    06:25  0:00 /usr/sbin/apache2 -k start
    www-data 32452  0.0  0.0 125648  340 ?        S    06:25  0:00 /usr/sbin/apache2 -k start
    www-data 32453  0.0  0.0 125648  340 ?        S    06:25  0:00 /usr/sbin/apache2 -k start
    
    EDIT:
    I also get a "Could not reserve shared memory" error or something on startup.
    This seems irregular when launching with 4GB on an 8GB RAM system...
     
  5. Offline

    andrewpo

    The only RAM use I can see is:
    • Minecraft - 53.9%
    • RKit - 0.2%
    • MySQL server - 0.3%
    Which adds up to 54.4%
    Are you running a 64-bit or 32-bit OS?
     
  6. Offline

    kubaku4

    And is this VPS or dedicated?
     
  7. Offline

    Obliviator

    Running Ubuntu 11.10 Server 64bit
    Code:
    Welcome to Ubuntu 11.10 (GNU/Linux 3.0.0-12-server x86_64)
    Thats on the SSH login page.

    Also, How could I use 8GB of RAM on a 32bit OS.
    Witchcraft XD

    EDIT:
    Its on a dedicated server, only my server running on the box.
     
  8. Offline

    andrewpo

    ^ If it's a VPS, do you have burstable RAM?

    + You couldn't use 8GB on a 32-bit OS, but your system is only using slightly over half your RAM (at the time you ran ps aux)

    That OS name/version string looks fine, there should be no issues with that.

    Could you ask your host to run a mem-test on the box?
    Have you tried using other RAM-intensive applications to see if they're able to utilise all the RAM they have been allocated?
     
  9. Offline

    Obliviator

    Top Says:
    [​IMG]

    Thats 7.6GB.

    EDIT:
    I can ask the host to run a mem-test,
    but I dont think I have any other memory intensive programs on the box.
    Its just for the server.
     
  10. Offline

    kubaku4

    yea, running memtest86 can resolve problem.
     
  11. Offline

    Obliviator

    Memtest came back with no errors.
    (It went for an hour or so)

    EDIT:
    I checked the free RAM 3 times within ~20 minutes or so, and:
    Code:
    root@auscraft:/# free
                total      used      free    shared    buffers    cached
    Mem:      8191940    3353248    4838692          0    146964    1370984
    -/+ buffers/cache:    1835300    6356640
    Swap:      8384508          0    8384508
    root@auscraft:/# free
                total      used      free    shared    buffers    cached
    Mem:      8191940    4161692    4030248          0    169044    1376640
    -/+ buffers/cache:    2616008    5575932
    Swap:      8384508          0    8384508
    root@auscraft:/# free
                total      used      free    shared    buffers    cached
    Mem:      8191940    6218868    1973072          0    174904    1381516
    -/+ buffers/cache:    4662448    3529492
    Swap:      8384508          0    8384508
    root@auscraft:/#
    
    It seems like a memory leak.
    Will post plugins if needed.
     
  12. Offline

    Obliviator

    Bump:

    The memory test came back with no errors.

    Maybe its a plugin issue?
    Code:
    Plugins (49): WorldBorder, PlugMan, Buycraft, Vault, Multiverse-Core, TreeAssist, RemoteToolkitPlugin, MCDocs, DisguiseCraft, ProperTime, Votifier, mcMMO, LagMeter, WorldEdit, NoCheatPlus, Multiverse-Inventories, Multiverse-NetherPortals, PermissionsEx, LogBlock, WorldGuard, mChatSuite, ChangeSilkTouch, iConomy, iBank, ReportRTS, MasterPromote, BKCommonLib, mcbans, SimpleSpleef, Modifyworld, FalseBookCore, MyWarp, ButtonWarp, AutoAnnouncer, Essentials, XrayInformer, Superpickaxe, HomeSpawnPlus, NoLagg, FalseBookCart, FalseBookBlock, VanishNoPacket, LWC, AutoRank, PreciousStones, SimpleSignEdit, ChestShop, DeathTpPlus, ecoCreature
    
    NoLagg and BKCommonLib are installed for the NoLaggExamine portion of it, and will be removed soon.
     
  13. Offline

    Obliviator

    Bump​
    Updated thread title for a possible problem.​
     
Thread Status:
Not open for further replies.

Share This Page