[groonga-dev,02014] TokenTrigramトークナイザを使ったオフラインインデックス構築時のsegment allocate failedについて

Back to archive index

Naoya Murakami visio****@gmail*****
2013年 12月 19日 (木) 13:03:05 JST


お世話になっております。村上です。

相談するか、しまいか悩んだのですが、まずは、カジュアルに相談してみます。

ちょっと実験してみると、思ったよりもTokenTrigramトークナイザの検索パフォーマンス
が非常によかったです。

日本語Wikipedia程度では、TokenMecabトークナイザで頻出語を除去させても、
まだTokenTrigramの方がはやかったです。
(この辺の実験結果は土曜日分のAdvent Calendarでまとめます。)

そこで、頻出語を除去するようにいじったTokenMecabトークナイザで構築している
400GiB超のデータベースでもTokenTrigramを試したらどうなるかなぁ、と思って
試したのですが、インデックス構築の最後の段階で、以下のように失敗しました。

落ちる時には、segment allocate failedと、deadlock detected!!! in
GRN_IO_SEG_REF(0x7f1394083680, 65536, 24614)の2種類でています。

こいつの原因を解析するのは大変そうですか?

<ログ1>
2013-12-15 03:55:51.466897|n|54379700|flushing:6825 npostings:12800936
2013-12-15 03:55:53.058463|n|54379700|flushed: 6825 encsize:41895289
2013-12-15 03:55:53.061265|n|54379700|nblocks=6826,
update_buffer_size=149615186055
2013-12-15 03:56:18.872530|n|54379700|nterms=2 chunk=16 total=0KB
2013-12-15 03:56:19.362481|n|54379700|nterms=2 chunk=110550297
total=107959KB
・・・
2013-12-15 04:52:45.500425|n|54379700|nterms=41080 chunk=31
total=102474606KB
2013-12-15 04:52:45.501188|n|54379700|nterms=41076 chunk=9 total=102474606KB
2013-12-15 04:52:45.501648|n|54379700|nterms=50014 chunk=9 total=102474606KB
2013-12-15 04:52:45.505480|n|54379700|nterms=16241 chunk=7049
total=102474613KB
2013-12-15 04:52:45.505842|e|54379700|segment allocate failed
2013-12-15
04:52:45.517396|e|54379700|/usr/lib64/libgroonga.so.0(grn_ii_buffer_commit+0x1b49)
[0x7fa48211fb99]
2013-12-15
04:52:45.517785|e|54379700|/usr/lib64/libgroonga.so.0(grn_ii_build+0x4b5)
[0x7fa4821205c5]
2013-12-15
04:52:45.517800|e|54379700|/usr/lib64/libgroonga.so.0(grn_obj_set_info+0xaec)
[0x7fa48204b2dc]
2013-12-15
04:52:45.517807|e|54379700|/usr/local/mysql/lib/plugin/ha_mroonga.so(_ZN10ha_mroonga20storage_create_indexEP5TABLEPKcP8_grn_objP16st_mroonga_shareP6st_keyPS5_SA_j+0x341)
[0x7fa37bde4d31]
2013-12-15
04:52:45.517813|e|54379700|/usr/local/mysql/lib/plugin/ha_mroonga.so(_ZN10ha_mroonga17storage_add_indexEP5TABLEP6st_keyjPP17handler_add_index+0x2ee)
[0x7fa37bdeb60e]
2013-12-15
04:52:45.517819|e|54379700|/usr/local/mysql/bin/mysqld(_Z17mysql_alter_tableP3THDPcS1_P24st_ha_create_informationP10TABLE_LISTP10Alter_infojP8st_orderb+0x1b7f)
[0x5c398f]
2013-12-15
04:52:45.517825|e|54379700|/usr/local/mysql/bin/mysqld(_ZN21Alter_table_statement7executeEP3THD+0x4b3)
[0x73e113]
2013-12-15
04:52:45.517832|e|54379700|/usr/local/mysql/bin/mysqld(_Z21mysql_execute_commandP3THD+0xfef)
[0x567e7f]
2013-12-15
04:52:45.517838|e|54379700|/usr/local/mysql/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x151)
[0x56b241]
2013-12-15
04:52:45.517845|e|54379700|/usr/local/mysql/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x11d6)
[0x56cb66]
2013-12-15
04:52:45.517852|e|54379700|/usr/local/mysql/bin/mysqld(_Z24do_handle_one_connectionP3THD+0x176)
[0x5f92f6]
2013-12-15
04:52:45.517856|e|54379700|/usr/local/mysql/bin/mysqld(handle_one_connection+0x4a)
[0x5f935a]
2013-12-15 04:52:45.517860|e|54379700|/lib64/libpthread.so.0()
[0x3c55e07851]
2013-12-15 04:52:45.517863|e|54379700|/lib64/libc.so.6(clone+0x6d)
[0x3c55ae894d]
2013-12-15 04:53:03.869665|n|2d20d720|mroonga 3.10 started.


<ログ2>
2013-12-15 18:53:47.800912|n|9ae22700|nterms=289 chunk=713786
total=101533281KB
2013-12-15 18:53:47.866977|n|9ae22700|nterms=591 chunk=3063283
total=101536273KB
2013-12-15 18:53:47.904876|n|9ae22700|nterms=137 chunk=1110727
total=101537357KB
2013-12-15 18:54:58.759441|C|9ae22700|deadlock detected!!! in
GRN_IO_SEG_REF(0x7f1394083680, 65536, 24614)
2013-12-15 18:54:58.764385|n|9ae22700|nterms=39298 chunk=9 total=101537357KB
2013-12-15 18:55:01.709773|n|989bc720|mroonga 3.10 started.
2013-12-15 18:55:01.709787|n|989bc720|log level is 'NOTICE'

ちなみにいじったMecabトークナイザではインデックスサイズ63GiBほどでうまくいっています。


以上、よろしくお願いします。



groonga-dev メーリングリストの案内
Back to archive index