OpenVZ Forum


Home » General » Support » *SOLVED* chkpnt/restore time
*SOLVED* chkpnt/restore time [message #15638] Wed, 08 August 2007 13:07 Go to next message
working_men is currently offline  working_men
Messages: 4
Registered: August 2007
Junior Member
Hi!

I wanted to test how long it takes for chkpnt/restore to complete.
Trying to determine time vs ram

1. test:
tmpfs with 350MB urandom/zero file
-->chkpnt: 81sec
-->restore: 86sec
-->dumpsize: 340MB

2. test:
C-program that allocates 660MB
-->chkpnt: 26sec
-->restore: 22sec
-->dumpsize: 660MB

3. test:
installed mysql-server (140MB)
-->chkpnt: 0.5sec
-->restore: 4sec
-->dumpsize: 30MB

My questions are:
How does openVZ generate the dump files?
or
Is there a difference between allocated/used memory?

It seems to me that it depends on which type of data is in RAM for the size of the dump and the time it takes.

Thanks alot for clearing this up for me!

thomas

[Updated on: Thu, 09 August 2007 10:06] by Moderator

Report message to a moderator

Re: chkpnt/restore time [message #15657 is a reply to message #15638] Thu, 09 August 2007 08:06 Go to previous messageGo to next message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
Hello!

There are different types of memory pages which are used by processes.
We need to save whole pages which are allocated and used, but we need to save only information about allocated pages.
We do not need to save pages which are read-only mapped from files (code sections and other data).

In your examples we have:

1. tmpfs
we have to save this file to dump, because it is stored only in memory and we can't map it from another place later during restore
That is why size of dump file is so huge

2. C-program
it is not clear what your program is doing. Just allocating memory or allocating and clearing it? Can you please post here source code of this test program.

3. mysql
mysql is threaded application and much memory is used for pages with code. We do not save such pages as I wrote above, thus image size is not so huge.


Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Re: chkpnt/restore time [message #15661 is a reply to message #15657] Thu, 09 August 2007 08:18 Go to previous messageGo to next message
working_men is currently offline  working_men
Messages: 4
Registered: August 2007
Junior Member
Hi

Firstly thanks for the info.
I understand now why dump sizes vary.

Just for information the veryvery trival C-Code:

main()
{
int i;
for(i=0;i<20000000;i++)
{
malloc(sizeof(int));
}
sleep(500000);
}

Thanks again

Thomas
Re: chkpnt/restore time [message #15711 is a reply to message #15661] Fri, 10 August 2007 08:33 Go to previous message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
Well, in this program you allocating 20000000 memory regions. For each such memory region kernel will allocate internal structure at least 16-byte length and we need to dump this structure during checkpointing.

If you will run simple program which doing malloc one time but for big memory region then you will see that image file will be small.


Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: Network problems
Next Topic: large memory server (32GB) :: 64bit kernel advantageous?
Goto Forum:
  


Current Time: Thu Feb 02 18:06:11 GMT 2023

Total time taken to generate the page: 0.00769 seconds