Aug 18, 2011
tom

x86_64 and memory issues

Question

Recently I’ve switched from ubuntu 32bit to 64bit version. And now I experiencing some problems.

All application take twice more memory. And some application takes even more. For example sshd on new server:

root      6608  0.0  0.0  67972  2912 ?        Ss   14:43   0:00 sshd: deploy [priv]
deploy    6616  0.0  0.0  67972  1724 ?        S    14:43   0:00 sshd: deploy@pts/4
root     20892  0.0  0.0  50916  1160 ?        Ss   15:53   0:00 /usr/sbin/sshd
root     21170  0.0  0.0  67972  2912 ?        Ss   15:56   0:00 sshd: deploy [priv]
deploy   21173  0.0  0.0  67972  1728 ?        S    15:56   0:00 sshd: deploy@pts/0
root     23802  0.0  0.0  67972  2912 ?        Ss   16:08   0:00 sshd: deploy [priv]
deploy   23804  0.0  0.0  67972  1724 ?        S    16:08   0:00 sshd: deploy@pts/1
root     24570  0.0  0.0  67972  2908 ?        Ss   12:45   0:00 sshd: deploy [priv]
deploy   24573  0.0  0.0  68112  1804 ?        S    12:45   0:00 sshd: deploy@pts/3
deploy   25014  0.0  0.0   5168   852 pts/0    S+   16:13   0:00 grep ssh

the same on the old server:

root      4867  0.0  0.0   5312  1028 ?        Ss   Mar23   0:00 /usr/sbin/sshd
root     23753  0.0  0.0   8052  2556 ?        Ss   16:15   0:00 sshd: deploy [priv]
deploy   23755  0.0  0.0   8052  1524 ?        S    16:15   0:00 sshd: deploy@pts/0
deploy   23770  0.0  0.0   3004   748 pts/0    D+   16:15   0:00 grep ssh

The same problems with postfix, nginx and some other application.

Answer

It’s a bit more complex than this.

Yes, the 64bit executables are going to consume more ram as some of the basic building-blocks of programs are larger on a 64bit system.

However, looking at the output you’ve provided it isn’t all that bad. Unless there’s actual contention for physical memory, the RSS (Resident Set Size, the part of a process which are in physical RAM) column is more appropriate, and looking at your output it’s a lot less than a doubling of RAM consumption.

A more comprehensive discussion on memory usage can be found here: Understanding memory usage on linux

Related posts:

  1. Ubuntu 10.10 x86_64 2.6.35-28 – possible memory leak – slabs slowly eating memory
  2. Facing error: “Could not open a connection to your authentication agent.”; trying to add ssh-key
  3. How to limit the memory used by an application in IIS?
  4. Mysql install and remove issues
  5. Memory Usage on Linux box does not match up with `free`

Leave a comment