Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Open Source

Checkpointing, CHPOX, and Linux


Checkpointing is a mechanism that lets you grab a snapshot of the current state of a program in execution, then save it on disk. Later the state of the program can be resumed, even after the machine has been rebooted or turned off.

Why do you need checkpointing? Consider these scenarios:

  • Your Monte Carlo program has been running for almost two days, and you guess it will take another 12 hours before completing the whole set. Then disaster strikes as the kernel suddenly hangs without reason. Since there's no native support of periodically saving progress, you end up restarting the whole thing from the beginning.

  • It is a common to have a UPS backing up workstations, especially for cluster nodes. However, since the UPS can only keep a system running for a few minutes when power failures occur, you are forced to stop the running process and probably lose the current progress.

  • Because of an emergency, you need to run an important task--but the system is currently overloaded with other, less important tasks. While all of your applications are important, the difference is a matter of priority. You face a dilemma here. Run the new task and the old ones, the CPU power is divided by the nature of multitasking (no matter what you do with the task priority, it is still divided). Stop the old ones? Likely. But this only leave you more CPU power, some memory areas are still occupied by the other program. So eventually killing the application is the last resort.

All of these scenarios (and there are a lot more) lead to one thing--you need a checkpointing solution so you won't lose a task's progress. Even though the task has native save/resume feature, checkpointing still give some help as the alternative in case there is a failure when you try to roll back using native feature. Keep in mind that both features doesn't guarantee flawless resume nor support every type of tasks.

In this article, we examine on open-source checkpointing project called CHPOX, short for "CHeckPOinter for Linux". CHPOX is a Linux kernel module for transparent dumping of specified processes into disk file, then restarting them. CHPOX was created by Olexander Sudakov and Eugeniy at the National Taras Shevchenko University, Kiev (Ukraine). Since CHPOX uses the kernel module approach, it can be supported by kernel Version (2.4.x) and dynamically inserted to or removed from kernel space, only loading when you need it.

For more information on checkpointing tools, go to www.checkpointing.org.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.