1834599 Members
3900 Online
110069 Solutions
New Discussion

swap & dump

 
SOLVED
Go to solution
bhavin asokan
Honored Contributor

swap & dump

hi,
at the time of booting hp server

logical volume 64 , 0x3 configured as root
logical volume 64 , 0x2 configured as swap
logical volume 64 , 0x2 configured as dump

can someone tell me the difference between swap & dump .why same lv is used for both .

regds,
7 REPLIES 7
Mark Grant
Honored Contributor

Re: swap & dump

Dump is a good place to save information useful if the system crashes. Swap is a place to store bits of memory when a running system starts to run short of RAM.

If the system crashes, there isn't much use in having any swap so why not just use the same disk space for both dump and swap.

Never preceed any demonstration with anything more predictive than "watch this"
Geoff Wild
Honored Contributor
Solution

Re: swap & dump

Swap is used for virtual memory.

Dump is used for a system panic.

if a system panics, it will dump the whole memory and the currently running kernel to the dump-device (lvol2 + secondary swap/dump if configured). After reboot the system will write the dump informations from the raw-device into the filesystem to /var/adm/crash

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.
Naveej.K.A
Honored Contributor

Re: swap & dump

hi bhavin,

swap - used in leiu of memory when the system runs out of memory.

dump - to save the contents of the memory in case of a system crash. then the /sbin/init.d/savecrash copies the content of the dump into /var/adm/crash during the boot time.

regds
Naveej
practice makes a man perfect!!!
Richard Pereira_1
Regular Advisor

Re: swap & dump

Hi,

Swap is essentially a space on your disk used for virtual memory and lets processes be paged out of ram in case you run short of physical memory, they will be "swaped" back into RAM when physical memory is freed up.

Dump is used during a system crash. If your OS crashes the system attempts to save a image of the contents of physical memory. When you reboot, theres a startup script that copies this image to a place on your filesystem (typically /var/adm/crash) for analysis.

Hope this helps.
Richard
Shaikh Imran
Honored Contributor

Re: swap & dump

Hi,
Swap is the disk space used as memory.
While dump is the disk space where the system dumps the memory information when
the system crash occurs which could be used later to analyze the cause of crash.

The same space is used because as soon ths system boots the swapper process is started and it has the PID zero while when the system crashes this swap space is no longer used and also the information in the swap space is not required to be dumped but only the memory info needs to be dumped.
This is very fast if we use the same space for dump and swap.

Regards,


I'll sleep when i am dead.
Joseph Loo
Honored Contributor

Re: swap & dump

hi,

maybe u would like to "hear"/read it from the horses mouth:

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000072951469

regards.
what you do not see does not mean you should not believe