1836223 Members
2108 Online
110096 Solutions
New Discussion

deactivate swap memory

 
Juquin_3
Advisor

deactivate swap memory

Hi , i would like to deactivate my swap memory . Can somebody tell me how to do it ?

thanks ,
6 REPLIES 6
Naveej.K.A
Honored Contributor

Re: deactivate swap memory

hi,

reboot

or

shutdown -r

Only way to deactivate the allocated swap space

with best wishes
Naveej
practice makes a man perfect!!!
Michael Tully
Honored Contributor

Re: deactivate swap memory

You can't, you need to reboot your system. If you have this swap entry in /etc/fstab you need to comment it before you reboot.
Anyone for a Mutiny ?
Dietmar Konermann
Honored Contributor

Re: deactivate swap memory

The swapoff() syscall is defined in HP-UX...

# grep swapoff /usr/include/sys/scall_define.h
#define SYS_swapoff 77

Unfortunately it is not implemented. So you need to comment/remove the corresponding entry from /etc/fstab and reboot.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Bill Hassell
Honored Contributor

Re: deactivate swap memory

Nope, can't do it. Swap space is really an extension to RAM so it would be like removing a memory module while the system is running. You can add swapspace with the swapon command but you can't remove swap space without a reboot.


Bill Hassell, sysadmin
Geoff Wild
Honored Contributor

Re: deactivate swap memory

As others have said - you can't do this live. Reqires a reboot.

Best to do it from SAM -> Disk and Filesystems -> 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.
Sridhar Bhaskarla
Honored Contributor

Re: deactivate swap memory

Hi,

I believe you are talking about the "memory" line you see in your 'swapinfo' output. That's pseudoswap and is simply nothing but a number, nearly 75% of the physical memory alloted at boot time. It allows you to configure lower device swaps and it is particularly useful if you have tonnes of physical memory on the systems. It does no harm on systems with larger memories, but may cause a hiccups on small systems only if you configured too little device swap.

If you want to get rid of it, you will need to make 'swapmem_on' kernel paramter to 0, configure the kernel and reboot the system. You can use SAM to do it for you.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try