Cybertec

PostgreSQL reliability on Linux

“out of memory” — this is definitely not something what you really want to see in any of your programs at any point in time. Especially for a database server such as PostgreSQL it can be pretty nasty if you run out of memory. If the error is detected by the database itself, it is basically not a problem at all and PostgreSQL will know how to deal with it.

However, what happens if you are NOT alone on your system? What if other processes eat up your database’s RAM? On Linux you can in some cases get in conflict with the so called “OOM-killer”. This is a feature of the operating system which basically kills a process which it feels is “best”. This should free up some memory – but you will also lose one or the other process on your system.

What if one of the processes killed happens to be PostgreSQL? In many cases this is exactly what you want to avoid. Currently there is no way to tell the Linux kernel which processes are potential candidates for some memory killing-party. This was an issue for some customers – in a professional database application it can be essential to make sure that the central service is always alive. In exchange you may sacrifice one or the other not so important process just to make sure that the central survive will also do its job as expected.

To fix the problem with the Linux kernel we hacked up a small page allowing users to teach the operating system core which processes to kill when running out of memory. Administrators can now define on which order the system is allowed to kill processes in the (hopefully rare) case of real emergency.

This small little feature can dramatically increase the availability of your database infrastructure.

Cybertec Schönig & Schönig GmbH offers enhanced Linux kernel reliability

To make PostgreSQL running on Linux even more reliable and secure Cybertec announces the availability of a patch for the Linux kernel which has especially been designed for high-performance and high-availability servers.

The new patch offers administrators the chance to configure the Linux OOM-killer more fain grained. By giving administrators the choice which processes Linux should kill in case of failure we open the door for a new level of service security. Make sure that your central database service is always up and running. With the help of our new configuration switches your Linux servers will be even more secure and more robust.

Go to download page

Enhanced Linux OOM-killer functionality:

This patch allows administrators to flexibly configure the Linux kernel OOM-killer to kill processes defined by the administrator rather and processes selected internally.

To use this feature, edit /proc/sys/vm/oom_preferred_tasks.

Here are some examples:

  • “mallocbomb”
  • “mytask,mallocbomb”
  • “mytask,mallocbomb,myprog”

The string accepted is up to 4096 bytes. Processes can be listed using a comma separated list.

3 types of config are allowed:

  1. full path of the executable, checked using the /proc/PID/exe link
  2. file name of the executable without the path, also checked as above
  3. file name of the executable without the path, checked using the

“comm” property of struct task_struct, which is approximately the process name as visible in top/ps.

Go to download page

www.cybertec.at | www.postgresql.at | www.postgresql-support.de | office@cybertec.at | +43 / 664 / 3933 974
Cybertec is a company offering a comprehensive set of services for the world's most advanced Open Source database, PostgreSQL. Our products work on all platforms including Linux, Solaris, and Windows. No matter whether your application is small or complex - we have the right solution for you.

WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera