Oracle Validated Configurations をちゃんと読む その3

hangcheck-timer関連設定値のトレンドを hangcheck_reboot=1 site:www.oracle.com/technology/tech/linux/validated-configurations/ - Google 検索 とかやってみてみると、
/etc/modprobe.conf
への書き方として

options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180 hangcheck_reboot=1

options hangcheck_timer hangcheck_reboot=1

しかなくて、最近はこの昔からのデフォルトがこの検証での主流だということがわかる。

hangcheck-tickとhangcheck_marginは昔からデフォルトは一緒で、hangcheck_rebootがなかった頃はリブートさせないということができないようになっていた。

Technical Resources | Oracleを見てみたら、http://www.oracle.com/technology/pub/articles/hunter_rac10gr2_iscsi_2.html#13 posted 6/29/07 21:18:44 GMT が一番目立つコンテンツになっていた。最近更新されたのがどのあたりなのかわからないんだけど、

Configuring and Loading the hangcheck-timer Module

There are two key parameters to the hangcheck-timer module:

* hangcheck-tick: This parameter defines the period of time between checks of system health. The default value is 60 seconds; Oracle recommends setting it to 30 seconds.
* hangcheck-margin: This parameter defines the maximum hang delay that should be tolerated before hangcheck-timer resets the RAC node. It defines the margin of error in seconds. The default value is 180 seconds; Oracle recommends setting it to 180 seconds.

Note: The two hangcheck-timer module parameters indicate how long a RAC node must hang before it will reset the system. A node reset will occur when the following is true:

system hang time > (hangcheck_tick + hangcheck_margin)

と書かれている。

RAC構築に不可欠なLinux OSの設定ポイント (2/3):Oracle SE RACで手軽に高可用性システム(2) - @IT 2007/6/13 といったコンテンツもできてた。
ここでは hangcheck_tick + hangcheck_margin = 50 が必要なんだそうだ。それぞれデフォルトの 1/6と 2/9だそうだ。


これらを見て、ちょっと気になったことが。

maineline kernelには2.5.60から入ってるけど、最新のソースLinux source code: drivers/char/hangcheck-timer.c (v2.6.21) - Bootlin*1は、

/*
 * hangcheck-timer.c
 *
 * Driver for a little io fencing timer.
#define VERSION_STR "0.9.0"

#define DEFAULT_IOFENCE_MARGIN 60	/* Default fudge factor, in seconds */
#define DEFAULT_IOFENCE_TICK 180	/* Default timer timeout, in seconds */

static int hangcheck_tick = DEFAULT_IOFENCE_TICK;
static int hangcheck_margin = DEFAULT_IOFENCE_MARGIN;

だし、ftp://ftp.redhat.com/pub/redhat/linux/updates/enterprise/2.1AS/en/os/SRPMS/kernel-2.4.9-e.12.src.rpm(Red Hat Advanced Server 2.1 Update 1)に入っているlinux-2.4.9-hangcheck.patchでも、

+++ linux/drivers/char/hangcheck-timer.h	2002-12-12 18:52:54.000000000 -0500
@@ -0,0 +1,8 @@
+
+#define VERSION_STR "0.4.0"
+#define VERSION_HASH_STR   "334adfa62c1a153a41bd68a787fbe0e9"
+
+void version_hash_print (void)
+{
+	printk(KERN_INFO "I/O fencing modules 0.4.0 (build 334adfa62c1a153a41bd68a787fbe0e9)\n");
+}

とか

+++ linux/drivers/char/hangcheck-timer.c	2002-12-12 18:52:54.000000000 -0500
@@ -0,0 +1,116 @@
+/*
+ * hangcheck-timer.c
+ *
+ * Test driver for a little io fencing timer.
+#define DEFAULT_IOFENCE_MARGIN 60	/* Default fudge factor, in seconds */
+#define DEFAULT_IOFENCE_TICK 180	/* Default timer timeout, in seconds */
+
+static int hangcheck_tick = DEFAULT_IOFENCE_TICK;
+static int hangcheck_margin = DEFAULT_IOFENCE_MARGIN;

だし。

昔から、I/O Fencingを目的としているというのがこれらからもわかる。tickも merginも I/O遮断するためのリブートのひとつの判断基準でしかない。


次に歴史を紐解く。

March 26, 2002 - Red Hat, Inc. (Nasdaq: RHAT) today announced Red Hat Linux Advanced Server, the first enterprise-class Linux operating system. Red Hat Accelerates UNIX-to-LINUX Migration by Announcing the First Enterprise-Class Linux Operating System

2002/05/20 - http://www.oracle.co.jp/news_owa/NEWS/news.news_detail?p_news_code=661

直接関係ないが、http://www.oracle.co.jp/news_owa/NEWS/news.NEWS_DETAIL?p_news_code=844より

Oracle Unbreakable Linuxについて
2002年6月から開始

2002/08/20 - 直接関係ないが、http://www.oracle.co.jp/news_owa/NEWS/news.news_detail?p_news_code=707(OCFSね、OCFS2でなく)

Wed Dec 04 2002 - http://lists.suse.com/archive/suse-oracle/2002-Dec/0037.htmlのように、「hangcheck-timerがいるんだってさー」という話が出始めたのはこの頃。

2003-02-14 - Updated kernel fixes kswapd performance problem and includes updated driversで REHL2.1の Eratta kernel-2.4.9-e.12公開。ここから hangcheck-timerがLinuxディストリビューションに含まれ始める。時を同じくしてTips for Installing and Configuring Oracle9i Real Application Clusters on Red Hat Linux Advanced Server An Oracle White Paperも公開。

March 12, 2003 - "With the introduction of Red Hat Enterprise Linux ES and WS, organizations are able to seamlessly deploy reliable, high value Linux solutions in all aspects of IT infrastructure." と同時に

Available since May, 2002, Red Hat Enterprise Linux AS (originally called Red Hat Linux Advanced Server)

と言い出す。( Red Hat Expands its Enterprise Linux Family with New Offerings for Mid-Tier Servers and Workstations より)

つまり、デフォルトは Linux kernel 2.4系が主流になりはじめた 2002年の頃に決めた値。必要としていたソフトウエアは実用されていなかった頃に決めた値。そもそも目的が違った頃に決めた値とも言えるような気がする。


それで検証した結果だということ。
結局hangcheck_reboot=0やhangcheck_dump_tasks=1を使って試すしかないのかな。


判断基準は自分で決めろってことですね。

*1:RHEL4U3(kernel-2.6.9-34.EL)以上に含まれているのもバージョンは同じ