Doubled Up RAM To 32 GB – Now How To Speed Up A LAPP Server?

Home » CentOS » Doubled Up RAM To 32 GB – Now How To Speed Up A LAPP Server?
CentOS 2 Comments

Dear CentOS users,

I run a small Facebook game at a CentOS 6.3 machine with PostgreSQL 8.4.3 + few PHP scripts + 1 Perl daemon and even though the server worked ok, I’ve suggested my users to double up the RAM
to 32 GB and they have collected money for that.

Now my problem is that I don’t know, which knob to turn and how to really use the additional memory.

Below is my top output at the peak time (evenings) –
as you see, 27 GB of RAM aren’t used:

# top – 18:47:55 up 23:12, 2 users, load average: 2.17, 2.31, 2.56
Tasks: 246 total, 2 running, 244 sleeping, 0 stopped, 0 zombie Cpu(s): 12.1%us, 0.2%sy, 0.0%ni, 87.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 32790380k total, 5296664k used, 27493716k free, 197132k buffers Swap: 2096056k total, 0k used, 2096056k free, 3815840k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12363 postgres 20 0 4376m 717m 710m S 40.6 2.2 2:03.48 postmaster
3842 nobody 20 0 118m 23m 3920 S 12.0 0.1 46:24.68 pref.pl
9178 postgres 20 0 4375m 518m 514m S 11.3 1.6 53:50.63 postmaster
12380 postgres 20 0 4377m 668m 660m S 11.3 2.1 2:33.26 postmaster
12243 postgres 20 0 4377m 668m 662m S 9.3 2.1 2:20.49 postmaster
12438 postgres 20 0 4374m 502m 498m S 6.3 1.6 1:03.34 postmaster
12249 postgres 20 0 4384m 852m 839m S 3.0 2.7 3:59.11 postmaster
12241 postgres 20 0 4378m 632m 625m S 1.7 2.0 2:48.62 postmaster
12156 apache 20 0 366m 27m 17m S 1.0 0.1 0:05.12 httpd
36 root 20 0 0 0 0 S 0.3 0.0 0:01.32 events/1
100 root 39 19 0 0 0 S 0.3 0.0 0:06.04 khugepaged
9217 postgres 20 0 21976 1036 516 S 0.3 0.0 1:01.07 pgbouncer
12010 apache 20 0 376m 37m 17m S 0.3 0.1 0:07.58 httpd
12280 apache 20 0 370m 30m 16m S 0.3 0.1 0:03.17 httpd
12362 apache 20 0 365m 15m 6816 R 0.3 0.0 0:01.90 httpd
12457 apache 20 0 360m 9.8m 3456 S 0.3 0.0 0:00.14 httpd
1 root 20 0 19352 1584 1284 S 0.0 0.0 0:01.03 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd

# vmstat 10
procs ———–memory———- —swap– —–io—- –system– —–cpu—

2 thoughts on - Doubled Up RAM To 32 GB – Now How To Speed Up A LAPP Server?

  • From: Alexander Farber

    Depends on your service… How much GBs do your database and your files do take?
    If you have 100 MB of files, the OS won’t cache 30+ GBs…

    JD

LEAVE A COMMENT