Operating System - HP-UX
1826215 Members
2908 Online
109691 Solutions
New Discussion

exec(2): insufficient swap or memory available.

 
SOLVED
Go to solution
apple
Super Advisor

exec(2): insufficient swap or memory available.

dear hpux gurus,
we were unable to start the oracle listener and db2. the error that we hit are:
1.
exec(2): insufficient swap or memory available.
and
2.
return not enough space

what should we do? when i run topas, this the output:
Memory: 6356392K (4444036K) real, 15465712K (10981952K) virtual, 36648K free Pa
ge# 1/32

hope to hear from you.
39 REPLIES 39
Dennis Handly
Acclaimed Contributor

Re: exec(2): insufficient swap or memory available.

Please provide the output of "swapinfo -tam". You are likely out of swapspace.
Jeeshan
Honored Contributor

Re: exec(2): insufficient swap or memory available.

HI

What is your swapinfo -tm output?

Do you enable swapmem_on ? this is for pseudo swap. Check then revert back.
a warrior never quits
apple
Super Advisor

Re: exec(2): insufficient swap or memory available.

dear hpux gurus,
how to check this enable swapmem_on for pseudo swap in our server?

attached is the output. hope to hear from you
Jeeshan
Honored Contributor

Re: exec(2): insufficient swap or memory available.

swapmem_on is a kernel parameter. If your OS version 11.11 apply command
#kmtune -q swapmem_on
11iv2
#kctune -q swapmem_on

and also check dbc_max_pct and dbc_min_pct values also.
You are seems to be in critical situation.

another extract solution is add an additional swap space.but first check the above values.
a warrior never quits
whiteknight
Honored Contributor

Re: exec(2): insufficient swap or memory available.

Almond,


your swap_mem_on is enabled, you have less swap space., you need to have 2x of your physical memory


WK
Problem never ends, you must know how to fix it
Yogeeraj_1
Honored Contributor

Re: exec(2): insufficient swap or memory available.

hi,

you do not have enough have enough swap configured (at least for the amount of physical memory you have).

>Topas ??
Is this an AIX machine? :)

have a look at this post:
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=6516

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
apple
Super Advisor

Re: exec(2): insufficient swap or memory available.

dear hpux gurus,
attached is the kernel values.
our os is hpux 11.23
hope to hear from you. hopefully there is a workaround and permanent solution to this. thanks a lot
Jeeshan
Honored Contributor

Re: exec(2): insufficient swap or memory available.

your dbc_max_pct is too high, you can minimize it's value to 10.

anyway, the issue is you have less swap space. add a swap space.
a warrior never quits
apple
Super Advisor

Re: exec(2): insufficient swap or memory available.

dear hpux gurus,
what is my current swap space? appreciate you can teach me how to read the swapinfo -tam output? the link how to increase the swap memory is very useful. hope to hear from you.
YAQUB_1
Respected Contributor

Re: exec(2): insufficient swap or memory available.

Ur physical memory is 8GB so U create 16 swap space.

how U create swap space in Ur system, here is process:-
1) lvcreate -C y -m 1 -L -n lvolx /dev/vg00
2) Next create an entry in /etc/fstab like this:
/dev/vg00/lvolx ... swap pri=2 0 0 --- (check same parameter already is there)

3) swapon -a

Hope it'll help 4 U.
YAQUB_1
Respected Contributor

Re: exec(2): insufficient swap or memory available.

sorry, 16GB
apple
Super Advisor

Re: exec(2): insufficient swap or memory available.

dear hpux gurus,
i can't find any swap entry in /etc/fstab.
below is the vg00 extraction from our /etc/fstab.
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand vxfs tranflush 0 1
/dev/vg00/lvol4 /home vxfs delaylog 0 2
/dev/vg00/lvol5 /opt vxfs delaylog 0 2
/dev/vg00/lvol6 /tmp vxfs delaylog 0 2
/dev/vg00/lvol7 /usr vxfs delaylog 0 2
/dev/vg00/lvol8 /var vxfs delaylog 0 2
hope to hear from you.
YAQUB_1
Respected Contributor

Re: exec(2): insufficient swap or memory available.

create the swap space, follow above process...
Sajjad Sahir
Honored Contributor

Re: exec(2): insufficient swap or memory available.

Dear Almond
please send u swapinfo -tam out put
u can use the swapinfo command to see u swap space
please send out put of these two

#swapinfo -tam
#dmesg | grep phys

thanks and regards

sajjad

Sajjad Sahir
Honored Contributor

Re: exec(2): insufficient swap or memory available.

Dear Almond

To fully utilize all of the RAM on a system there must be a sufficient amount
of virtual memory to accomodate all processes . The virtual memory be at least eaqual to physical memory plus application
size.
For a process
to spawn it needs a sufficient amount of virtual memory to be placed in
reserve. There should be a sufficient amount of free device swap to open any
processes that may be spawned during the course of operations. By subtracting
thereserve from the device total you can determine this value.
If there is an insufficient amount available ( typically from device swap)
you will receive an error : cannot fork : not enough virtual memory. If
this error is received , you will need to allocate more device swap. This
should be configured on a disk with no other swap partitions, and ideally of
the same size and priority of existing swap logical volumes to enable
interleaving.

thanks and regards

sajjad sahir
Sajjad Sahir
Honored Contributor

Re: exec(2): insufficient swap or memory available.

dear Almond

u can create new device swap

in another volume group

eg: lvcreate -L 1000 /dev/vg01/lvol9
swapon /dev/vg01/lvol9
then u have to make an entry in /etc/fstab file for next reboot onwards if u need it

thanks and regards

sajjadsahir
apple
Super Advisor

Re: exec(2): insufficient swap or memory available.

dear hpux gurus,
attached is the phys output. hope to hear from you. thanks a lot
apple
Super Advisor

Re: exec(2): insufficient swap or memory available.

dear hpux gurus,
attached is the phys output. hope to hear from you. thanks a lot
apple
Super Advisor

Re: exec(2): insufficient swap or memory available.

can i increase the existing swap rather than creating the new one. i'm sorry if my question is not good. i'm a newbie. hope to hear from you. thanks a lot
Rasheed Tamton
Honored Contributor

Re: exec(2): insufficient swap or memory available.

Dear Almond,

You already have 2* mem as swap. For temporary solution add another swap device. Also reduce the dbc_max_pct value to 15 as a first step.

If it is HPUX 11.23, do the below commands immediately:

kctune dbc_max_pct=15
kctune dbc_min_pct=5

And add additional swap device or swap file as temporary solution.

Rgds.
Dennis Handly
Acclaimed Contributor

Re: exec(2): insufficient swap or memory available.

You are using 100% of your swapspace. You also have swapmem_on as indicated by the "memory" line.

>what is my current swap space?

Just look at the total line.
You can also use SAM to add swapspace.

>I can't find any swap entry in /etc/fstab.

Primary swap doesn't need to be listed.

>attached is the phys output.

Unfortunately using dmesg is not perfect and the info could be overwritten. You'll need to use SAM to get the physical memory size.
Rasheed Tamton
Honored Contributor
Solution

Re: exec(2): insufficient swap or memory available.

>And add additional swap device or swap file as temporary solution.

What I meant was swap on a file system as temporary solution.

If you have enough free space avble in /oratemp dir, you can create a 100MB swap as below:

swapon -p2 -l 100M /oratemp
(-p2 priority 2)


Sajjad Sahir
Honored Contributor

Re: exec(2): insufficient swap or memory available.

Dear Almond

u already used 100 percent so there is no space there. the solution is u have to create new device swap i mentioned in my previous thread how to create new device swap once u created a new device swap if u want to permanetly i mean next boot time onwards u have to make an entry in /etc/fstab file ok. also in my previous thread i briefly explained u can check it that one also
thanks and regards

Sajjad
Sajjad Sahir
Honored Contributor

Re: exec(2): insufficient swap or memory available.

Dear Almondo

in swapinfo -tam
output
The key areas u have to monitor reserve , memory and total
I think now u can easily understand

thanks and regards

sajjad