Intermediate SQL Color Coded SQL, UNIX and Database Essays

27Apr/101

How to reduce the size of AIX Memory. Quickly

This seems to be a rather odd exercise – why would you ever agree to have less memory on your system to run programs ?

But, of course it makes sense in a few special cases – testing how much memory your programs really need as well as validating how the system will behave if less memory is available (not every system is privileged to start with 32Gb+ of RAM).

You could do it by going to the server room and physically removing a couple of DIMMs … But that is a lot of work (walking is physical exercise after all) and you run a large risk of making the hardware guy somewhat suspicious (if you do it often) …

And, besides, there is a better way – through rmss command that can do exactly the same thing logically.

Let’s see how it works:

As you can see, reducing available memory in AIX is really very easy and, once done, all system processes are suddenly running in a new “virtual world” that has less memory. The question becomes then

A philosophical question

How do we know if we had not been in another virtual world originally?

as we can see that our eyes (that is – AIX configuration commands) can easily deceive us. In other words, is there any way to find out how much memory the system really has?

Well, at least as long as we are dealing only with the effects of rmss command, the answer is YES, however, we need to go a bit deeper (to hardware level) to get it.

# This command can be used to find out the size of memory
# that is physically known to the hardware
AIX> lsattr -El mem0
goodsize 7680 Amount of usable physical memory in Mbytes False
size     7680 Total amount of physical memory in Mbytes  False

# Notice that it might be different than "virtual" size, set by rmss
AIX> getconf REAL_MEMORY
4191680

# For older systems (that do not have mem0 device)
# the following command can be used:
AIX> lsattr -El sys0 -a realmem
realmem 7864320 Amount of usable physical memory in Kbytes False
Comments (1) Trackbacks (0)
  1. This is really an awesome piece of info!


Leave a comment

No trackbacks yet.