Add additional swap place on AIX server


 
Thread Tools Search this Thread
Operating Systems AIX Add additional swap place on AIX server
# 1  
Old 04-18-2016
Add additional swap place on AIX server

Can anyone help me the detailed procedure and commands to follow to add additional swap on aix server .

My system shows following as of now ,
Code:
#lsattr -E -l sys0 -a realmem
realmem 13893632 Amount of usable physical memory in Kbytes False

#pstat -s
PAGE SPACE:

          USED PAGES   FREE PAGES
           735534       837330

# lsps -a
Page Space      Physical Volume   Volume Group    Size %Used Active  Auto  Type
hd6             hdisk0            rootvg        6144MB    47   yes   yes    lv


Please help me on finding what is the maximum swap size that i can increase? Also i need to do it without a reboot.Thanks
Moderator's Comments:
Mod Comment Please use CODE tags to display program input, program output, and code segments; not for your entire post.

Last edited by Don Cragun; 04-18-2016 at 10:46 PM.. Reason: Fix CODE tags.
# 2  
Old 04-19-2016
The maximum theoretical size of one paging device is 64 GB. You have paging device hd6 which is 6 GB. Theoretically you can expand it by 56 GB.

Before expanding you have to answer the following questions:
- how much memory does your application require?
- is it possible to buy more memory, if the LPAR doesn't have enough, or to move it to another server?
- how did it happen, that you have 47% used in paging space? Which processes are now in the paging space and which of the running processes overuse the memory resources you have?

After you answered the questions and if you still want to have more paging space, you can look in rootvg using lsvg rootvg, if you have enough space in the volume group, and then create additional paging space with mkps or expand the existing with chps.
This User Gave Thanks to agent.kgb For This Post:
# 3  
Old 04-19-2016
agent.kgb is absolutely correct: paging space is a "plan B", if "plan A" (memory) fails. Your system shouldn't need to use it under normal circumstance and it should be there only for contingency.

Right now you have your 13GB memory already overused to a point where ~3GB of paging space is needed. You should put in more memory (unless other data show different probably ~5GB, to cover for the 3GB already missing and some extra on top to make the system comfortably run) and only then make your paging space bigger.

The size of paging space should be in some relation to the real memory, like the size of a jerry can should reflect the cars gas consumption. And like the jerry can it should be there but under normal circumstances never be used.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 4  
Old 04-19-2016
It would also be interessting when the paging to PS occurs. I saw that RMAN accumulated used pgsp at nightly backup jobs (over some days/weeks) but on days peak loads had about no paging out at all.
You can monitor this by writing a small script using vmstat to have a look at the pi/po columns or have nmon installed to record it for you.

Depending on the oslevel of your OS it could also maybe handled by adjusting some tuning parameters.

If you want to investigate what is using the paging space at the moment you can issue:
Code:
svmon -P | awk '/Pid/ {a=$0; getline; if($5 != 0) {print a RS $0}}'

Column 5 shows which processes have allocated pgsp.

Last edited by zaxxon; 04-20-2016 at 03:45 AM.. Reason: typo
This User Gave Thanks to zaxxon For This Post:
# 5  
Old 04-20-2016
Hello All,

Thank you for your help. I checked the physical memory being only 13GB and left the idea of increasing swap size as of now.
I will get back in case of any progress.
# 6  
Old 04-20-2016
Just an additional info - if you don't get all processes listed, try adding ALL to svmon like:

Code:
svmon -P ALL| awk '/Pid/ {a=$0; getline; if($5 != 0) {print a RS $0}}'

# 7  
Old 04-20-2016
zaxxon,

not every segment in AIX memory has a corresponding process.

The real command to look, what lays in paging space is something like:

Code:
svmon -S -O sortseg=pgsp -t 20

-S shows all memory segments, -O sortseg=pgsp sorts them, showing first the segments which have most pages in the paging space, -t 20 shows only first 20 segments.

This is an example from a system, which pages right now:
Code:
$ lsps -a
Page Space      Physical Volume   Volume Group    Size %Used Active Auto  Type Chksum
hd6             hdisk0            rootvg        8192MB    24   yes   yes    lv     0
$ svmon -S -O sortseg=pgsp -t 20
Unit: page

    Vsid      Esid Type Description              PSize  Inuse   Pin Pgsp Virtual
  8f61ff         - work mmap paging                 sm      0     0 65024   65024
  86078c         - work                             sm    127     4 64405   64451
  838405         - work mmap paging                 sm    762     0 64336   65024
  820fc6         - work mmap paging                 sm   2521     0 62703   64770
  847dc9         - work mmap paging                 sm  13881     0 54286   64032
  825b45         - work                             sm     24     0 14056   14075
  8c97db         - work                             sm    224     4 10339   10475
    8000         - work page table area              s   6916    43 6873    6916
  81de02         - work                             sm   3362     0 4965    6645
  82dd04         - work                             sm   2491     0 4285    5952
  8d4e5b         - work                             sm     65     4 3694    3747
  8e841d         - work                             sm    535     0 3473    3677
  8c9f59         - work                             sm    603     0 2611    2791
  820b66         - work                             sm    287     0 2588    2619
  8c58f9         - work                             sm   3443     0 2428    3497
  884951         - work mmap paging                 sm   8192     0 2186    8192
  8c1b3a         - work                             sm     48     4 2082    2101
  825965         - work                              m   4096     0  124    4096
    1001         - work other kernel segments        m    149     0  123     235
  8d001a         - work                              m    194     0  115     272

As you see, all the segments are "work" segments and some of them has "long" Vsids (virtual segment IDs), such as 8f61ff, but some of them has "short" Vsid, such as 8000. Those with long IDs are probably associated with some processes. You can look at them using the following command:

Code:
$ svmon -S 8f61ff -lrj

    Vsid      Esid Type Description              PSize  Inuse   Pin Pgsp Virtual
  8f61ff         - work mmap paging                  s      0     0 65024   65024
                                                     m      0     0    0       0
                   Addr Range: 0..65534
                   pid(s)=12058694

The last string contains pid, which you can then find with ps -ef:

Code:
$ ps -ef | grep [1]2058694
    root 12058694 16973956   0   Feb 01      - 320:07 /opt/ibm/node/bin/node /kibana/src/cli

If you look at a segment with short Vsid, you will not see any pid:

Code:
$ svmon -S 8000 -lrj

    Vsid      Esid Type Description              PSize  Inuse   Pin Pgsp Virtual
    8000         - work page table area              s   6916    43 6873    6916
                   Addr Range: 0..8703
                   System segment

It is a system segment and it has no corresponding process. Sometimes they can grow very big and in this case it is not an application problem, but server's configuration problem.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find -exec How to add additional parameter when calling a funtion

Hello Current working script is : # # my_script BEGIN # function a_function { FIRST_PARAM="$1" DO_SOMETHING "$FIRST_PARAM" } export -f a_function START_HERE="/home/some_user/Documents" find $START_HERE" -exec bash -c 'a_function "$0" ' {} \; (5 Replies)
Discussion started by: jcdole
5 Replies

2. Shell Programming and Scripting

awk to extract multiple values from file and add two additional fields

In the attached file I am trying to use awk to extract multiple values and create the tab-delimited desired output. In the output R_Index is a the sequential # and Pre_Enrichment is defaulted to .. I can extract from the values to the side of the keywords, but most are above and I can not... (2 Replies)
Discussion started by: cmccabe
2 Replies

3. UNIX for Advanced & Expert Users

release fre swap memory on AIX

Hello, How is it possible to free swap memory on AIX. when i do vmstat on machine i can see less than 1 Gb "fre" when usually I have around 5 GB. I dont wont to reboot the server. any idea? Thanks. (3 Replies)
Discussion started by: LiorAmitai
3 Replies

4. Shell Programming and Scripting

add a additional column in csv file

Thanks for allwoing me to discuss in this forum GIVEN BELOW A simple shell script which will ask for the user to input a PC name and it will produce the output in CSV with the PC name #! /bin/bash read -p "enter the PC name :" pc #checking for netstat report netstat -pant |sed '1,2d'... (1 Reply)
Discussion started by: ayyappancheta
1 Replies

5. AIX

How to add/remove additional DNS and IP to AIX

Hello, How to add/remove additional DNS and IP to AIX ? I wanted to add 3 more new DNS and IP addresses to existing AIX 5.2. (1 Reply)
Discussion started by: balareddy
1 Replies

6. Shell Programming and Scripting

Add additional numbers to file

I need to change the following field from: "7/3/2009 7:07:12 PM","12345676","ok","8674" "6/3/2009 8:07:12 PM","12345676","ok","8674" "5/1/2009 7:07:12 PM","12345676","ok","8674" "4/9/2009 3:07:12 AM","12345676","ok","8674" "3/8/2009 3:07:12 PM","12345676","ok","8674" "2/7/2009 4:07:12... (10 Replies)
Discussion started by: Pablo_beezo
10 Replies

7. AIX

Transferring files from one AIX server to another AIX server in binary mode

Hi, I am a newbie to AIX. We have 2 AIX5.3 servers in our environment, I need to transfer some files in Binary mode from one server to another and some files in ASCII mode from one server to another server. Could you please help me as to how I need to do that? Thanks, Rakesh (4 Replies)
Discussion started by: rakeshc.apps
4 Replies

8. AIX

aix swap

I have an unsupported legacy server: # uname -a AIX ibmms01 3 4 0054960A4C00 Following a period of poor performance, it was investigated using vmstat 10. There upto 10 blocked kernel threads reported, and free memory was down to 123. The scan rate was high, 3000+ with lots of page in page... (6 Replies)
Discussion started by: jabberwocky
6 Replies

9. AIX

Aix 5.1 add new harddisk on 7029-6c3 Server

I have some problem to add a fujitsu Model MAT3147NC on my Aix 5.1 Server. When i run the cfgmrg command and after de lspv command, i can see my disk but i think it's missing some drivers to get operational. Thank's for your help. (0 Replies)
Discussion started by: sdulude01
0 Replies

10. UNIX for Dummies Questions & Answers

server based Including additional code > Lycos way

For a project we need to make sure that all php / html files in a certain directory on the webserver are showing advertisments of us. For example, when you get a website from Lycos, you'll have an advertisement in the right corner. How to? As far as I can see, Lycos includes a javascript... (1 Reply)
Discussion started by: valentijnb
1 Replies
Login or Register to Ask a Question