1834607 Members
2814 Online
110069 Solutions
New Discussion

memory

 
SOLVED
Go to solution
Fadia Almarei
Super Advisor

memory

Dear All
i have hp 11i system on rp5430 server,it has 2GB memory and i have to add another 2GB memory, so is it needed to increse the swap space and if is it needed how to do that
fadia.marei
14 REPLIES 14
Geoff Wild
Honored Contributor

Re: memory

Depends - how much swap is configured?

swapinfo -tam

Used to be 2 times the memory - but now it is more application dependent - for example, SAP wants around 24GB of swap.

Others - same as amount of ram.

Easiest is to use SAM to add swap - or:
man 1m swapon

Rgds...Geoff


Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Fadia Almarei
Super Advisor

Re: memory

this mean that it is necessary to increase the swap as we use an oracle application on the system, but i want to ask if i want to use the sam should i add it from file systems part,or how to do it .
fadia.marei
Geoff Wild
Honored Contributor

Re: memory

You would want to create a new logical volume for the swap - I wouldn't use file system swap.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Fadia Almarei
Super Advisor

Re: memory

i do not understand , please tell me how to do it step by step
fadia.marei
Stuart Abramson
Trusted Contributor
Solution

Re: memory

H. CONFIGURE ADDITIONAL SWAP AND DUMP

1. Check maxswapchunks to ensure that yo have enough. You'll get an error message if you don't.

2. Swap depends on application. In general should be roughly twice memory.
Swap segments should be equal in size.

3. Check current swap:

root@gbo315-d:/root# swapinfo -at
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RES. PRI NAME
dev 1945600 0 1945600 0% 0 - 1 /dev/vg00/lvol2
dev 1945600 0 1945600 0% 0 - 1 /dev/vg00/lvol4
reserve - 1886004 -1886004
memory 2309808 262216 2047592 11%
total 7839408 2148220 5691188 27% - 0 -

4. Check available space on vg00:

vgdisplay vg00

5. Pick new swap file size:

If you're adding 2 GB, make it 2 GB.

3. Create swap LV. ASSIGN TO SECOND DISK IN VG00:

lvcreate -C y -r n -n swap02 vg00 # create swap volume
# Contiguous
# No bad block reloction
lvextend -L 1996 /dev/vg00/swap02 /dev/dsk/c5t9d0 # assign to 2nd disk

# modify /etc/fstab
echo "/dev/vg00/swap02 ... swap pri=2 0 0" >> /etc/fstab

# turn swap on..
swapon -a # all /etc/fstab swap

4. If there was a file system on this LV before, you must:

swapon -f /dev/vg00/swap02

5. Now, if you mirror the root disk, you want to mirror swap also:

lvextend -m 1 /dev/vg00/swap02 /dev/dsk/c2t6d0
Geoff Wild
Honored Contributor

Re: memory

And here's a good doc to read:

"Managing Swap and Dump"

http://docs.hp.com/en/5990-8172/ch06s03.html

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Fadia Almarei
Super Advisor

Re: memory

thanks for your replays ,but i want to ask if there is any thing needed rather than the swap after the upgrade of the memory
fadia.marei
Pete Randall
Outstanding Contributor

Re: memory

No, nothing else is required.


Pete

Pete
Fadia Almarei
Super Advisor

Re: memory

i try to remove the swap and i use the sam for that and when i try to open sam again it does not work and i try to create it using the command line using
lvcreate -C y -r n -n swap vg00
and i try to start sam another time but also it doesnot work and give the same error message. what to do
fadia.marei
Pete Randall
Outstanding Contributor

Re: memory

Do you get an error message from SAM?


Pete

Pete
Pete Randall
Outstanding Contributor

Re: memory

Did you try to remove your *only* swap area? I can see where that might create problems. If you were able to manually add the swap space, you'll need to activate it with the swapon command.


Pete

Pete
Fadia Almarei
Super Advisor

Re: memory

ok i do it ,yes i remove my only swap ,but i recreate it manualy ,and it is OK now
fadia.marei
Chris Vail
Honored Contributor

Re: memory

If you're increasing the memory (and swap) on a system, you may want to check if your application can use it. If the system is running Oracle, you will probably want to increase the size of the SGA according to Oracles' recommendations. There are a couple of kernel parameters (Shared Memory Segment) that will have to be changed. Depending on the version of the OS, this may not be necessary as some of these are dynamic.


Chris
Fadia Almarei
Super Advisor

Re: memory

another question please,by extending my swap space this mean that i will lose part of my free hard disk space,even if i may not need this swap space , or if i use the file system swap i will lose the free space of my file systems free space,is what i said is right or what is that
fadia.marei