0

I'm running a server with a number of game servers on it.

My memory usage is very high, however there is almost no swap usage in comparison.

My swappiness is set to 100

              total        used        free      shared  buff/cache   available
Mem:           125G        114G        1.6G        754M        9.6G        9.9G
Swap:          127G        889M        127G

fdisk output

Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xeaabd0c6

Device     Boot   Start        End   Sectors   Size Id Type
/dev/sda1  *       2048     999423    997376   487M 83 Linux
/dev/sda2       1001470 1000214527 999213058 476.5G  5 Extended
/dev/sda5       1001472 1000214527 999213056 476.5G 8e Linux LVM


Disk /dev/mapper/ubuntu--vg-root: 348.5 GiB, 374207414272 bytes, 730873856 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ubuntu--vg-swap_1: 128 GiB, 137388621824 bytes, 268337152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

swapon -s

Filename                                Type            Size    Used    Priority
/dev/dm-1                               partition       134168572       958328  -1

Why isn't the swap getting used?

  • Why isn't the swap being used? – James McDonnell Jun 23 '18 at 05:26
  • Do you see the server ever actually run out of RAM? ~1.6G is still a significant chunk. Also what are the applications that are running on this server? Are they Java apps? Also what does `swapon -s` show? – slm Jun 23 '18 at 05:30
  • Some useful resources - https://unix.stackexchange.com/questions/88693/why-is-swappiness-set-to-60-by-default & https://askubuntu.com/questions/103915/how-do-i-configure-swappiness. – slm Jun 23 '18 at 05:37
  • It's hosting game servers. – James McDonnell Jun 23 '18 at 05:49
  • That part I saw in your Q, can you be more specific, are they written in Java? I'm curious if there's a JVM involved. Typically the JVM has Xmx and Xms settings which can restrict it from going beyond. – slm Jun 23 '18 at 05:50
  • Ark servers, Unreal engine mixed with steams server software, so should be c++ – James McDonnell Jun 23 '18 at 05:52
  • Why would it swap when there's still **9.9G available**? (That's more than many server has in total. ) – Esa Jokinen Jun 23 '18 at 15:50

0 Answers0