Riak Merge On Restarts Only

Hector Castro hector at basho.com
Tue Jan 22 16:28:01 EST 2013


As I read through this thread, I came across the following FAQ entry
[0] in the Riak docs that echos a lot of what Brian mentioned.

[0] http://docs.basho.com/riak/1.2.1/cookbooks/faqs/developing-faq/#why-does-it-seem-that-bitcask-merging-is-only-trig

--
Hector


On Tue, Jan 22, 2013 at 1:14 PM, Brian Sparrow <bsparrow at basho.com> wrote:
> Anytime.
>
> --
> Brian Sparrow
> Developer Advocate
> Basho Technologies
>
> Sent with Sparrow
>
> On Tuesday, January 22, 2013 at 1:13 PM, Ian Ha wrote:
>
> Thanks for all your help Brian. We will have another look at our configs and
> our read write characteristics.
>
> --
> Sent mobile
>
> On Tuesday, 22 January, 2013 at 12:53 PM, Brian Sparrow wrote:
>
> Yes Ian based on the output of vnode_status the 2.1GB file is still opened
> and the 340MB file was created by the last merge. For your system it seems a
> smaller max_file_size would work well. 1GB max_file_size(and then reduce
> other thresholds and triggers which use bytes by half as well) is generally
> a good size. This will sacrifice disk IO to free up extra disk space.
> Depending on how frequently you update/delete objects even smaller file
> size(200MB) may be warranted.
>
> Thanks,
>
> --
> Brian Sparrow
> Developer Advocate
> Basho Technologies
>
> Sent with Sparrow
>
> On Tuesday, January 22, 2013 at 12:17 PM, Ian Ha wrote:
>
> There is another file in the that partition. It's at 340 MB, and has the
> filename 4.bitcask.data.
>
> My understanding is because the other file is at 2.1G, and we have the
> default at 2Gb, wouldn't that warrant the file to be closed and therefore
> appear in vnode_status?
>
> Looks like after i ran the erlang code in riak attach I got the following:
>
> [{frag_merge_trigger,40},
>  {dead_bytes_merge_trigger,268435456},
>  {frag_threshold,40},
>  {included_applications,[]},
>  {data_root,"/var/lib/riak/bitcask"},
>  {open_timeout,4},
>  {require_hint_crc,false},
>  {dead_bytes_threshold,134217728},
>  {max_file_size,2147483648},
>  {max_fold_puts,0},
>  {max_fold_age,-1},
>  {small_file_threshold,10485760},
>  {sync_strategy,none},
>  {expiry_secs,3888000},
>  {merge_window,always}]
>
> So the max file size is a t 2.14 and the file is at 2.12, so I guess that's
> why it didn't merge. Since I didn't set that value in the config, does that
> appear to be the correct default value?
>
> Thanks for the log config, I will add that to our cluster.
>
>
> On Tue, Jan 22, 2013 at 11:42 AM, Brian Sparrow <bsparrow at basho.com> wrote:
>
> If the file is not reported in vnode_status then the file has not yet been
> closed. Is there a more recent(and smaller size) .data file in that
> partition? That file could just be on the edge of being closed.
>
> To confirm you bitcask settings, from `riak attach` on any node run
> `application:get_all_env(bitcask).`
>
> Further, you can enable logging whenever a file passes the merge triggers
> with the log_needs_merge setting in the bitcask settings in app.config. ex:
> {log_needs_merge, true},
>
> This will log anytime a file is ready to be merged. If you do not see a
> subsequent merge after the log entry then the file did not pass one of the
> thresholds to allow the merge.
>
> -Brian
>
> --
> Brian Sparrow
> Developer Advocate
> Basho Technologies
>
> Sent with Sparrow
>
> On Tuesday, January 22, 2013 at 11:18 AM, Ian Ha wrote:
>
> Brian, here's the dump for vnode_status. Interesetingly enough, the 2.1G
> file at 271177061614132377401074334195404075912721858560/5.bitcask.data is
> not part of this dump. Not sure why or if that is a concern?
>
> Vnode status information
> -------------------------------------------
>
> VNode: 8563486156235759286349715816696970818296479744
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185800},
>
> {status,[{"/var/lib/riak/bitcask/8563486156235759286349715816696970818296479744/4.bitcask.data",
>            5,31874309,338046717}]}]
>
> VNode: 19981467697883438334816003572292931909358452736
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185635},
>
> {status,[{"/var/lib/riak/bitcask/19981467697883438334816003572292931909358452736/4.bitcask.data",
>            5,34907347,342699456}]}]
>
> VNode: 31399449239531117383282291327888893000420425728
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,184771},
>
> {status,[{"/var/lib/riak/bitcask/31399449239531117383282291327888893000420425728/4.bitcask.data",
>            5,32830995,329973073}]}]
>
> VNode: 42817430781178796431748579083484854091482398720
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,184847},
>
> {status,[{"/var/lib/riak/bitcask/42817430781178796431748579083484854091482398720/7.bitcask.data",
>            1,18113882,91425091},
>
> {"/var/lib/riak/bitcask/42817430781178796431748579083484854091482398720/4.bitcask.data",
>            5,31974540,334178572}]}]
>
> VNode: 54235412322826475480214866839080815182544371712
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186027},
>
> {status,[{"/var/lib/riak/bitcask/54235412322826475480214866839080815182544371712/4.bitcask.data",
>            5,31978319,338241457}]}]
>
> VNode: 65653393864474154528681154594676776273606344704
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185753},
>
> {status,[{"/var/lib/riak/bitcask/65653393864474154528681154594676776273606344704/4.bitcask.data",
>            5,33745910,339735357}]}]
>
> VNode: 77071375406121833577147442350272737364668317696
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185840},
>
> {status,[{"/var/lib/riak/bitcask/77071375406121833577147442350272737364668317696/4.bitcask.data",
>            5,30572735,337791556}]}]
>
> VNode: 88489356947769512625613730105868698455730290688
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186673},
>
> {status,[{"/var/lib/riak/bitcask/88489356947769512625613730105868698455730290688/4.bitcask.data",
>            5,32874502,336092493}]}]
>
> VNode: 99907338489417191674080017861464659546792263680
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,184970},
>
> {status,[{"/var/lib/riak/bitcask/99907338489417191674080017861464659546792263680/4.bitcask.data",
>            5,32396426,330001394}]}]
>
> VNode: 111325320031064870722546305617060620637854236672
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185248},
>
> {status,[{"/var/lib/riak/bitcask/111325320031064870722546305617060620637854236672/4.bitcask.data",
>            5,34161176,335074205}]}]
>
> VNode: 122743301572712549771012593372656581728916209664
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185760},
>
> {status,[{"/var/lib/riak/bitcask/122743301572712549771012593372656581728916209664/4.bitcask.data",
>            5,30889834,335031242}]}]
>
> VNode: 134161283114360228819478881128252542819978182656
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185590},
>
> {status,[{"/var/lib/riak/bitcask/134161283114360228819478881128252542819978182656/4.bitcask.data",
>            5,32798615,337772144}]}]
>
> VNode: 145579264656007907867945168883848503911040155648
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185460},
>
> {status,[{"/var/lib/riak/bitcask/145579264656007907867945168883848503911040155648/4.bitcask.data",
>            5,33085394,336272206}]}]
>
> VNode: 156997246197655586916411456639444465002102128640
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186096},
>
> {status,[{"/var/lib/riak/bitcask/156997246197655586916411456639444465002102128640/4.bitcask.data",
>            5,34342279,336669714}]}]
>
> VNode: 168415227739303265964877744395040426093164101632
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185756},
>
> {status,[{"/var/lib/riak/bitcask/168415227739303265964877744395040426093164101632/4.bitcask.data",
>            5,29834588,334221105}]}]
>
> VNode: 179833209280950945013344032150636387184226074624
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185663},
>
> {status,[{"/var/lib/riak/bitcask/179833209280950945013344032150636387184226074624/7.bitcask.data",
>            1,4326604,84769249},
>
> {"/var/lib/riak/bitcask/179833209280950945013344032150636387184226074624/4.bitcask.data",
>            5,32222921,327833678}]}]
>
> VNode: 191251190822598624061810319906232348275288047616
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185930},
>
> {status,[{"/var/lib/riak/bitcask/191251190822598624061810319906232348275288047616/4.bitcask.data",
>            5,32790298,341206859}]}]
>
> VNode: 202669172364246303110276607661828309366350020608
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185911},
>
> {status,[{"/var/lib/riak/bitcask/202669172364246303110276607661828309366350020608/4.bitcask.data",
>            5,30258774,334550584}]}]
>
> VNode: 214087153905893982158742895417424270457411993600
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185180},
>
> {status,[{"/var/lib/riak/bitcask/214087153905893982158742895417424270457411993600/4.bitcask.data",
>            5,34331320,338067428}]}]
>
> VNode: 225505135447541661207209183173020231548473966592
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185486},
>
> {status,[{"/var/lib/riak/bitcask/225505135447541661207209183173020231548473966592/4.bitcask.data",
>            5,33282502,336653351}]}]
>
> VNode: 236923116989189340255675470928616192639535939584
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185553},
>
> {status,[{"/var/lib/riak/bitcask/236923116989189340255675470928616192639535939584/4.bitcask.data",
>            5,35582186,339871589}]}]
>
> VNode: 248341098530837019304141758684212153730597912576
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185181},
>
> {status,[{"/var/lib/riak/bitcask/248341098530837019304141758684212153730597912576/4.bitcask.data",
>            5,33057915,343594362}]}]
>
> VNode: 259759080072484698352608046439808114821659885568
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185155},
>
> {status,[{"/var/lib/riak/bitcask/259759080072484698352608046439808114821659885568/4.bitcask.data",
>            5,31763402,336956394}]}]
>
> VNode: 271177061614132377401074334195404075912721858560
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185760},
>
> {status,[{"/var/lib/riak/bitcask/271177061614132377401074334195404075912721858560/4.bitcask.data",
>            5,35371762,340778827}]}]
>
> VNode: 282595043155780056449540621951000037003783831552
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185797},
>
> {status,[{"/var/lib/riak/bitcask/282595043155780056449540621951000037003783831552/4.bitcask.data",
>            5,31127659,341388940}]}]
>
> VNode: 294013024697427735498006909706595998094845804544
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185400},
>
> {status,[{"/var/lib/riak/bitcask/294013024697427735498006909706595998094845804544/4.bitcask.data",
>            5,33172810,335029860}]}]
>
> VNode: 305431006239075414546473197462191959185907777536
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185370},
>
> {status,[{"/var/lib/riak/bitcask/305431006239075414546473197462191959185907777536/4.bitcask.data",
>            5,35447783,339131698}]}]
>
> VNode: 316848987780723093594939485217787920276969750528
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185306},
>
> {status,[{"/var/lib/riak/bitcask/316848987780723093594939485217787920276969750528/4.bitcask.data",
>            5,33100563,334514005}]}]
>
> VNode: 328266969322370772643405772973383881368031723520
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185587},
>
> {status,[{"/var/lib/riak/bitcask/328266969322370772643405772973383881368031723520/4.bitcask.data",
>            5,31554776,329354531}]}]
>
> VNode: 339684950864018451691872060728979842459093696512
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,184990},
>
> {status,[{"/var/lib/riak/bitcask/339684950864018451691872060728979842459093696512/7.bitcask.data",
>            2,17893708,87660389},
>
> {"/var/lib/riak/bitcask/339684950864018451691872060728979842459093696512/4.bitcask.data",
>            5,32530630,332735318}]}]
>
> VNode: 351102932405666130740338348484575803550155669504
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185489},
>
> {status,[{"/var/lib/riak/bitcask/351102932405666130740338348484575803550155669504/7.bitcask.data",
>            1,16949080,90740582},
>
> {"/var/lib/riak/bitcask/351102932405666130740338348484575803550155669504/4.bitcask.data",
>            5,31736396,336629981}]}]
>
> VNode: 362520913947313809788804636240171764641217642496
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185317},
>
> {status,[{"/var/lib/riak/bitcask/362520913947313809788804636240171764641217642496/4.bitcask.data",
>            5,34728997,335644618}]}]
>
> VNode: 373938895488961488837270923995767725732279615488
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185189},
>
> {status,[{"/var/lib/riak/bitcask/373938895488961488837270923995767725732279615488/4.bitcask.data",
>            5,33860427,338229690}]}]
>
> VNode: 385356877030609167885737211751363686823341588480
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185076},
>
> {status,[{"/var/lib/riak/bitcask/385356877030609167885737211751363686823341588480/4.bitcask.data",
>            5,32015829,331802410}]}]
>
> VNode: 396774858572256846934203499506959647914403561472
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185502},
>
> {status,[{"/var/lib/riak/bitcask/396774858572256846934203499506959647914403561472/4.bitcask.data",
>            5,34371519,338605515}]}]
>
> VNode: 408192840113904525982669787262555609005465534464
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186081},
>
> {status,[{"/var/lib/riak/bitcask/408192840113904525982669787262555609005465534464/10.bitcask.data",
>            6,490500,3116567},
>
> {"/var/lib/riak/bitcask/408192840113904525982669787262555609005465534464/8.bitcask.data",
>            5,26188498,171694974},
>
> {"/var/lib/riak/bitcask/408192840113904525982669787262555609005465534464/6.bitcask.data",
>            17,11782388,73101186},
>
> {"/var/lib/riak/bitcask/408192840113904525982669787262555609005465534464/4.bitcask.data",
>            13,20195069,117631531}]}]
>
> VNode: 419610821655552205031136075018151570096527507456
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185717},
>
> {status,[{"/var/lib/riak/bitcask/419610821655552205031136075018151570096527507456/4.bitcask.data",
>            5,31829307,331435676}]}]
>
> VNode: 431028803197199884079602362773747531187589480448
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185947},
>
> {status,[{"/var/lib/riak/bitcask/431028803197199884079602362773747531187589480448/4.bitcask.data",
>            5,32173706,338148596}]}]
>
> VNode: 442446784738847563128068650529343492278651453440
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185537},
>
> {status,[{"/var/lib/riak/bitcask/442446784738847563128068650529343492278651453440/4.bitcask.data",
>            5,35813666,338837080}]}]
>
> VNode: 453864766280495242176534938284939453369713426432
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185746},
>
> {status,[{"/var/lib/riak/bitcask/453864766280495242176534938284939453369713426432/4.bitcask.data",
>            5,32624042,334740185}]}]
>
> VNode: 465282747822142921225001226040535414460775399424
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185468},
>
> {status,[{"/var/lib/riak/bitcask/465282747822142921225001226040535414460775399424/7.bitcask.data",
>            2,20331282,91766521},
>
> {"/var/lib/riak/bitcask/465282747822142921225001226040535414460775399424/4.bitcask.data",
>            5,32647444,344746992}]}]
>
> VNode: 476700729363790600273467513796131375551837372416
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185831},
>
> {status,[{"/var/lib/riak/bitcask/476700729363790600273467513796131375551837372416/4.bitcask.data",
>            5,32209907,332813073}]}]
>
> VNode: 488118710905438279321933801551727336642899345408
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186592},
>
> {status,[{"/var/lib/riak/bitcask/488118710905438279321933801551727336642899345408/4.bitcask.data",
>            5,33320036,333898295}]}]
>
> VNode: 499536692447085958370400089307323297733961318400
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185629},
>
> {status,[{"/var/lib/riak/bitcask/499536692447085958370400089307323297733961318400/4.bitcask.data",
>            5,33497617,343082792}]}]
>
> VNode: 510954673988733637418866377062919258825023291392
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185481},
>
> {status,[{"/var/lib/riak/bitcask/510954673988733637418866377062919258825023291392/4.bitcask.data",
>            5,32209418,336325646}]}]
>
> VNode: 522372655530381316467332664818515219916085264384
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185230},
>
> {status,[{"/var/lib/riak/bitcask/522372655530381316467332664818515219916085264384/4.bitcask.data",
>            5,34077445,337997080}]}]
>
> VNode: 533790637072028995515798952574111181007147237376
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186355},
>
> {status,[{"/var/lib/riak/bitcask/533790637072028995515798952574111181007147237376/4.bitcask.data",
>            5,30786415,335334027}]}]
>
> VNode: 545208618613676674564265240329707142098209210368
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186271},
>
> {status,[{"/var/lib/riak/bitcask/545208618613676674564265240329707142098209210368/4.bitcask.data",
>            5,32730917,335737716}]}]
>
> VNode: 556626600155324353612731528085303103189271183360
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186035},
>
> {status,[{"/var/lib/riak/bitcask/556626600155324353612731528085303103189271183360/7.bitcask.data",
>            1,4873700,85319443},
>
> {"/var/lib/riak/bitcask/556626600155324353612731528085303103189271183360/4.bitcask.data",
>            5,31326139,336025933}]}]
>
> VNode: 568044581696972032661197815840899064280333156352
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,184440},
>
> {status,[{"/var/lib/riak/bitcask/568044581696972032661197815840899064280333156352/4.bitcask.data",
>            5,32950443,333793428}]}]
>
> VNode: 579462563238619711709664103596495025371395129344
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185118},
>
> {status,[{"/var/lib/riak/bitcask/579462563238619711709664103596495025371395129344/4.bitcask.data",
>            5,31707260,338029164}]}]
>
> VNode: 590880544780267390758130391352090986462457102336
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185254},
>
> {status,[{"/var/lib/riak/bitcask/590880544780267390758130391352090986462457102336/4.bitcask.data",
>            5,33033620,333558333}]}]
>
> VNode: 602298526321915069806596679107686947553519075328
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185817},
>
> {status,[{"/var/lib/riak/bitcask/602298526321915069806596679107686947553519075328/4.bitcask.data",
>            5,33359523,340174269}]}]
>
> VNode: 613716507863562748855062966863282908644581048320
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185892},
>
> {status,[{"/var/lib/riak/bitcask/613716507863562748855062966863282908644581048320/4.bitcask.data",
>            5,32059047,335268151}]}]
>
> VNode: 625134489405210427903529254618878869735643021312
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185479},
>
> {status,[{"/var/lib/riak/bitcask/625134489405210427903529254618878869735643021312/4.bitcask.data",
>            5,31377434,333663874}]}]
>
> VNode: 636552470946858106951995542374474830826704994304
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186471},
>
> {status,[{"/var/lib/riak/bitcask/636552470946858106951995542374474830826704994304/4.bitcask.data",
>            5,31637370,331456191}]}]
>
> VNode: 647970452488505786000461830130070791917766967296
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185696},
>
> {status,[{"/var/lib/riak/bitcask/647970452488505786000461830130070791917766967296/4.bitcask.data",
>            5,33490059,341805230}]}]
>
> VNode: 659388434030153465048928117885666753008828940288
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185111},
>
> {status,[{"/var/lib/riak/bitcask/659388434030153465048928117885666753008828940288/4.bitcask.data",
>            5,33355158,339718408}]}]
>
> VNode: 670806415571801144097394405641262714099890913280
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185663},
>
> {status,[{"/var/lib/riak/bitcask/670806415571801144097394405641262714099890913280/4.bitcask.data",
>            5,33049532,339186274}]}]
>
> VNode: 682224397113448823145860693396858675190952886272
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185580},
>
> {status,[{"/var/lib/riak/bitcask/682224397113448823145860693396858675190952886272/4.bitcask.data",
>            5,34273270,336960838}]}]
>
> VNode: 693642378655096502194326981152454636282014859264
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185571},
>
> {status,[{"/var/lib/riak/bitcask/693642378655096502194326981152454636282014859264/4.bitcask.data",
>            5,33173397,331159169}]}]
>
> VNode: 705060360196744181242793268908050597373076832256
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186008},
>
> {status,[{"/var/lib/riak/bitcask/705060360196744181242793268908050597373076832256/4.bitcask.data",
>            5,32475858,334556980}]}]
>
> VNode: 716478341738391860291259556663646558464138805248
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185593},
>
> {status,[{"/var/lib/riak/bitcask/716478341738391860291259556663646558464138805248/4.bitcask.data",
>            5,33130883,341173503}]}]
>
> VNode: 727896323280039539339725844419242519555200778240
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185629},
>
> {status,[{"/var/lib/riak/bitcask/727896323280039539339725844419242519555200778240/4.bitcask.data",
>            5,33103829,336311860}]}]
>
> VNode: 739314304821687218388192132174838480646262751232
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185624},
>
> {status,[{"/var/lib/riak/bitcask/739314304821687218388192132174838480646262751232/4.bitcask.data",
>            5,31556811,334381544}]}]
>
> VNode: 750732286363334897436658419930434441737324724224
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186224},
>
> {status,[{"/var/lib/riak/bitcask/750732286363334897436658419930434441737324724224/4.bitcask.data",
>            5,30142108,342742989}]}]
>
> VNode: 762150267904982576485124707686030402828386697216
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185299},
>
> {status,[{"/var/lib/riak/bitcask/762150267904982576485124707686030402828386697216/4.bitcask.data",
>            5,32275793,339187482}]}]
>
> VNode: 773568249446630255533590995441626363919448670208
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185603},
>
> {status,[{"/var/lib/riak/bitcask/773568249446630255533590995441626363919448670208/4.bitcask.data",
>            5,30237450,330464324}]}]
>
> VNode: 784986230988277934582057283197222325010510643200
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186145},
>
> {status,[{"/var/lib/riak/bitcask/784986230988277934582057283197222325010510643200/4.bitcask.data",
>            5,30762226,337042253}]}]
>
> VNode: 796404212529925613630523570952818286101572616192
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186029},
>
> {status,[{"/var/lib/riak/bitcask/796404212529925613630523570952818286101572616192/4.bitcask.data",
>            5,33089921,342650037}]}]
>
> VNode: 807822194071573292678989858708414247192634589184
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186228},
>
> {status,[{"/var/lib/riak/bitcask/807822194071573292678989858708414247192634589184/4.bitcask.data",
>            5,31644203,336945269}]}]
>
> VNode: 819240175613220971727456146464010208283696562176
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185946},
>
> {status,[{"/var/lib/riak/bitcask/819240175613220971727456146464010208283696562176/4.bitcask.data",
>            5,34478537,335108377}]}]
>
> VNode: 830658157154868650775922434219606169374758535168
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185938},
>
> {status,[{"/var/lib/riak/bitcask/830658157154868650775922434219606169374758535168/4.bitcask.data",
>            5,32153080,336335603}]}]
>
> VNode: 842076138696516329824388721975202130465820508160
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185119},
>
> {status,[{"/var/lib/riak/bitcask/842076138696516329824388721975202130465820508160/4.bitcask.data",
>            5,32662173,342685946}]}]
>
> VNode: 853494120238164008872855009730798091556882481152
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186095},
>
> {status,[{"/var/lib/riak/bitcask/853494120238164008872855009730798091556882481152/4.bitcask.data",
>            5,31724299,338609269}]}]
>
> VNode: 864912101779811687921321297486394052647944454144
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185978},
>
> {status,[{"/var/lib/riak/bitcask/864912101779811687921321297486394052647944454144/4.bitcask.data",
>            5,31688977,332396013}]}]
>
> VNode: 876330083321459366969787585241990013739006427136
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186038},
>
> {status,[{"/var/lib/riak/bitcask/876330083321459366969787585241990013739006427136/9.bitcask.data",
>            1,82942,4223127},
>
> {"/var/lib/riak/bitcask/876330083321459366969787585241990013739006427136/8.bitcask.data",
>            2,20442384,94777157},
>
> {"/var/lib/riak/bitcask/876330083321459366969787585241990013739006427136/5.bitcask.data",
>            5,26398003,329299684}]}]
>
> VNode: 887748064863107046018253872997585974830068400128
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185605},
>
> {status,[{"/var/lib/riak/bitcask/887748064863107046018253872997585974830068400128/4.bitcask.data",
>            5,32415353,335591556}]}]
>
> VNode: 1173197603404299022229911066887485002106617724928
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185976},
>
> {status,[{"/var/lib/riak/bitcask/1173197603404299022229911066887485002106617724928/4.bitcask.data",
>            5,32719451,334916473}]}]
>
> VNode: 1184615584945946701278377354643080963197679697920
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186439},
>
> {status,[{"/var/lib/riak/bitcask/1184615584945946701278377354643080963197679697920/7.bitcask.data",
>            2,20171431,87739364},
>
> {"/var/lib/riak/bitcask/1184615584945946701278377354643080963197679697920/4.bitcask.data",
>            5,34315029,334169356}]}]
>
> VNode: 1196033566487594380326843642398676924288741670912
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185659},
>
> {status,[{"/var/lib/riak/bitcask/1196033566487594380326843642398676924288741670912/4.bitcask.data",
>            5,34544534,339094321}]}]
>
> VNode: 1207451548029242059375309930154272885379803643904
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185309},
>
> {status,[{"/var/lib/riak/bitcask/1207451548029242059375309930154272885379803643904/4.bitcask.data",
>            5,34049175,334609625}]}]
>
> VNode: 1218869529570889738423776217909868846470865616896
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185067},
>
> {status,[{"/var/lib/riak/bitcask/1218869529570889738423776217909868846470865616896/9.bitcask.data",
>            5,21798031,55300856},
>
> {"/var/lib/riak/bitcask/1218869529570889738423776217909868846470865616896/6.bitcask.data",
>            7,19228418,50004789},
>
> {"/var/lib/riak/bitcask/1218869529570889738423776217909868846470865616896/5.bitcask.data",
>            7,25130869,298276178}]}]
>
> VNode: 1230287511112537417472242505665464807561927589888
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185677},
>
> {status,[{"/var/lib/riak/bitcask/1230287511112537417472242505665464807561927589888/4.bitcask.data",
>            5,34162507,338171429}]}]
>
> VNode: 1241705492654185096520708793421060768652989562880
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185480},
>
> {status,[{"/var/lib/riak/bitcask/1241705492654185096520708793421060768652989562880/4.bitcask.data",
>            5,32122493,340603091}]}]
>
> VNode: 1253123474195832775569175081176656729744051535872
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186191},
>
> {status,[{"/var/lib/riak/bitcask/1253123474195832775569175081176656729744051535872/4.bitcask.data",
>            5,32683442,337318456}]}]
>
> VNode: 1264541455737480454617641368932252690835113508864
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185594},
>
> {status,[{"/var/lib/riak/bitcask/1264541455737480454617641368932252690835113508864/4.bitcask.data",
>            5,33864031,342388629}]}]
>
> VNode: 1275959437279128133666107656687848651926175481856
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185644},
>
> {status,[{"/var/lib/riak/bitcask/1275959437279128133666107656687848651926175481856/4.bitcask.data",
>            5,33250712,338253781}]}]
>
> VNode: 1287377418820775812714573944443444613017237454848
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185323},
>
> {status,[{"/var/lib/riak/bitcask/1287377418820775812714573944443444613017237454848/4.bitcask.data",
>            5,32485461,339612430}]}]
>
> VNode: 1298795400362423491763040232199040574108299427840
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185903},
>
> {status,[{"/var/lib/riak/bitcask/1298795400362423491763040232199040574108299427840/4.bitcask.data",
>            5,32102630,336913196}]}]
>
> VNode: 1310213381904071170811506519954636535199361400832
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185513},
>
> {status,[{"/var/lib/riak/bitcask/1310213381904071170811506519954636535199361400832/4.bitcask.data",
>            5,32704593,337827399}]}]
>
> VNode: 1321631363445718849859972807710232496290423373824
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185796},
>
> {status,[{"/var/lib/riak/bitcask/1321631363445718849859972807710232496290423373824/4.bitcask.data",
>            5,31667414,344554808}]}]
>
> VNode: 1333049344987366528908439095465828457381485346816
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,184729},
>
> {status,[{"/var/lib/riak/bitcask/1333049344987366528908439095465828457381485346816/4.bitcask.data",
>            5,31916929,331982952}]}]
>
> VNode: 1344467326529014207956905383221424418472547319808
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186374},
>
> {status,[{"/var/lib/riak/bitcask/1344467326529014207956905383221424418472547319808/4.bitcask.data",
>            5,32011535,336838669}]}]
>
> VNode: 1355885308070661887005371670977020379563609292800
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185097},
>
> {status,[{"/var/lib/riak/bitcask/1355885308070661887005371670977020379563609292800/4.bitcask.data",
>            5,31257938,327694910}]}]
>
> VNode: 1367303289612309566053837958732616340654671265792
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185280},
>
> {status,[{"/var/lib/riak/bitcask/1367303289612309566053837958732616340654671265792/4.bitcask.data",
>            5,33641764,341085585}]}]
>
> VNode: 1378721271153957245102304246488212301745733238784
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185792},
>
> {status,[{"/var/lib/riak/bitcask/1378721271153957245102304246488212301745733238784/5.bitcask.data",
>            5,32139774,336659768}]}]
>
> VNode: 1390139252695604924150770534243808262836795211776
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185647},
>
> {status,[{"/var/lib/riak/bitcask/1390139252695604924150770534243808262836795211776/5.bitcask.data",
>            5,31422173,335753645}]}]
>
> VNode: 1401557234237252603199236821999404223927857184768
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185641},
>
> {status,[{"/var/lib/riak/bitcask/1401557234237252603199236821999404223927857184768/5.bitcask.data",
>            5,32892084,335640971}]}]
>
> VNode: 1412975215778900282247703109755000185018919157760
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185982},
>
> {status,[{"/var/lib/riak/bitcask/1412975215778900282247703109755000185018919157760/5.bitcask.data",
>            5,32650794,337720285}]}]
>
> VNode: 1424393197320547961296169397510596146109981130752
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186569},
>
> {status,[{"/var/lib/riak/bitcask/1424393197320547961296169397510596146109981130752/5.bitcask.data",
>            5,31520831,340970872}]}]
>
> VNode: 1435811178862195640344635685266192107201043103744
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186322},
>
> {status,[{"/var/lib/riak/bitcask/1435811178862195640344635685266192107201043103744/5.bitcask.data",
>            5,32047072,337905167}]}]
>
> VNode: 1447229160403843319393101973021788068292105076736
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,186082},
>
> {status,[{"/var/lib/riak/bitcask/1447229160403843319393101973021788068292105076736/5.bitcask.data",
>            5,32158728,335402990}]}]
>
> VNode: 1458647141945490998441568260777384029383167049728
> Backend: riak_kv_bitcask_backend
> Status:
> [{key_count,185244},
>
> {status,[{"/var/lib/riak/bitcask/1458647141945490998441568260777384029383167049728/7.bitcask.data",
>            3,20056866,73970408},
>
> {"/var/lib/riak/bitcask/1458647141945490998441568260777384029383167049728/5.bitcask.data",
>            5,32748739,331478355}]}]
>
>
> On Tue, Jan 22, 2013 at 11:03 AM, Brian Sparrow <bsparrow at basho.com> wrote:
>
> What is reported by riak-admin vnode_status?
>
> Thanks,
> Brian
>
> --
> Brian Sparrow
> Developer Advocate
> Basho Technologies
>
> Sent with Sparrow
>
> On Tuesday, January 22, 2013 at 10:49 AM, Ian Ha wrote:
>
> Thanks Brian. This is very helpful and informative!
>
> Only question is we do indeed have data files that are > 2GB that haven't
> merged. I have a data file at 2.1G, as of today. The last merged happened
> Jan 20, which was two days ago.
>
> Anything we are missing here?
>
>
> On Sat, Jan 19, 2013 at 2:01 PM, Brian Sparrow <bsparrow at basho.com> wrote:
>
> Hi Ian,
>
> Q: Why does this happen on a restart only and not at other times, even
> though we have set our merge_window config setting to 'always'?
>
> A: The merge_window setting defaults to always and that simply means that
> bitcask will merge anytime the merge_triggers and thresholds set in the
> app.config are satisfied on a closed bitcask file. A bitcask data file is
> closed when it reaches the max_file_size threshold set in app.config(default
> of 2GB) or the node is stopped. Merging is happening on restart because this
> file is now closed and eligible for merge. You are not seeing merging during
> normal operation because the files are not reaching the 2GB max_file_size.
>
> Q: I'm assuming our config values are correct as the restart considers the
> thresholds met to go ahead with a merge.
>
> A: I do not see anything wrong with your configuration with the exception of
> no max_file_size being set. If you want to merge more often, reduce the
> max_file size to 1GB or lower(the lower the file size, the more merging). A
> good way to estimate the appropriate size is to look at how large your .data
> files are getting in your bitcask data directory and deciding from there
> what size threshold you would like to set based on your disk usage needs.
>
> Q: Also: Are there any tools out there that I can run on my data directory
> that will tell me the size of the dead byte ratios? Would be nice to see
> what the dead byte 'state' of my data dir is in so I can tell whether indeed
> merge conditions are met.
>
> A: The command you are looking for is riak-admin vnode_status. This will
> list all partitions on the local node as well as the number of keys in each
> partition and a list of closed bitcask data files in the format:
>
> {CLOSE_DATA_FILE_NAME, FRAG_PERCENTAGE, DEAD_BYTES, TOTAL_FILE_SIZE}
>
> Again, a data file must be closed(reached max_file_size or closed by node
> stop) to be reported in this command.
>
> Hope this answers all your questions.
>
> Thanks!
>
>
> --
> Brian Sparrow
> Customer Service Engineer
> Basho Technologies
>
> On Friday, January 18, 2013 at 5:14 PM, Ian Ha wrote:
>
> Hi,
>
> In our production system, we notice that merges are not taking place. We
> have noticed, however, that when we restart riak (via a 'riak stop' then a
> 'riak start'), then the merges are triggered and our disk usage goes way day
> (which is what we want). We use bitcask.
>
> Why does this happen on a restart only and not at other times, even though
> we have set our merge_window config setting to 'always'?
>
> I'm assuming our config values are correct as the restart considers the
> thresholds met to go ahead with a merge.
>
> Also: Are there any tools out there that I can run on my data directory that
> will tell me the size of the dead byte ratios? Would be nice to see what the
> dead byte 'state' of my data dir is in so I can tell whether indeed merge
> conditions are met.
>
> Our bit cask configs are as follows in app.config:
>
> {bitcask, [
>                 {data_root, "/var/lib/riak/bitcask"},
>                 {dead_bytes_merge_trigger, 268435456},
>                 {dead_bytes_threshold, 134217728},
>                 {expiry_secs, 3888000},
>                 {frag_merge_trigger, 40},
>                 {frag_threshold, 20},
>                 {merge_window, always},
>                 {small_file_threshold, 10485760},
>                 {sync_strategy, none}
>         ]},
>
>
> Thanks!
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>




More information about the riak-users mailing list