<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Why does merge-buckets only merge up to 300 buckets? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-does-merge-buckets-only-merge-up-to-300-buckets/m-p/598903#M12622</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I'm checking out the "merge-buckets" command. I created an index with 1000 events per bucket. in sum my index have&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;~/splunk/bin/splunk search "| dbinspect index=testbuckets2 | stats count"
count
-----
5479&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;buckets.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;~/splunk/bin/splunk merge-buckets --index-name=testbuckets2 --min-size=1 --max-count=1000 
Using the following config: --max-count=1000 --min-size=1 --max-size=1000 --max-timespan=7776000
Found (300) buckets to merge.

Starting to merge (300) buckets. Number of buckets already merged: 0/300 (0.00%).
New Bucket:
/Users/andreas/splunk/var/lib/splunk/testbuckets2/db/db_1653310364_1653310268_17359

Number of buckets merged: 300/300 (100.00%).
Number of buckets created: 1.
Time taken: 27 seconds, 21 milliseconds&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;after the operation i see 299 buckets less&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;~/splunk/bin/splunk search "| dbinspect index=testbuckets2 | stats count"

count
-----
5180&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;running merge-bucket a second time doesn't merge any further buckets.&amp;nbsp; It seems there is a hardcoded limit of 300 buckets?! any good reason for this?&lt;/P&gt;
&lt;P&gt;best regards,&lt;/P&gt;
&lt;P&gt;Andreas&lt;/P&gt;</description>
    <pubDate>Mon, 23 May 2022 15:20:21 GMT</pubDate>
    <dc:creator>schose</dc:creator>
    <dc:date>2022-05-23T15:20:21Z</dc:date>
    <item>
      <title>Why does merge-buckets only merge up to 300 buckets?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-does-merge-buckets-only-merge-up-to-300-buckets/m-p/598903#M12622</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I'm checking out the "merge-buckets" command. I created an index with 1000 events per bucket. in sum my index have&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;~/splunk/bin/splunk search "| dbinspect index=testbuckets2 | stats count"
count
-----
5479&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;buckets.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;~/splunk/bin/splunk merge-buckets --index-name=testbuckets2 --min-size=1 --max-count=1000 
Using the following config: --max-count=1000 --min-size=1 --max-size=1000 --max-timespan=7776000
Found (300) buckets to merge.

Starting to merge (300) buckets. Number of buckets already merged: 0/300 (0.00%).
New Bucket:
/Users/andreas/splunk/var/lib/splunk/testbuckets2/db/db_1653310364_1653310268_17359

Number of buckets merged: 300/300 (100.00%).
Number of buckets created: 1.
Time taken: 27 seconds, 21 milliseconds&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;after the operation i see 299 buckets less&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;~/splunk/bin/splunk search "| dbinspect index=testbuckets2 | stats count"

count
-----
5180&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;running merge-bucket a second time doesn't merge any further buckets.&amp;nbsp; It seems there is a hardcoded limit of 300 buckets?! any good reason for this?&lt;/P&gt;
&lt;P&gt;best regards,&lt;/P&gt;
&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 15:20:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-does-merge-buckets-only-merge-up-to-300-buckets/m-p/598903#M12622</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2022-05-23T15:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why does merge-buckets only merge up to 300 buckets?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Why-does-merge-buckets-only-merge-up-to-300-buckets/m-p/613541#M13946</link>
      <description>&lt;P&gt;Apologies for seeing this post so late. Hopefully the response can still be of help to others.&lt;/P&gt;&lt;P&gt;There is a default bucket count for merging, but that is overridden by the&amp;nbsp;--max-count=1000 parameter specified.&lt;/P&gt;&lt;P&gt;There could be various reasons for not merging more buckets:&lt;/P&gt;&lt;P&gt;1) The time span for a bucket is defaulted to&amp;nbsp;&lt;SPAN&gt;7776000secs (90 days). If the buckets are very spread out, the buckets may not be large enough to be merged to meet the min-size of 1MB that was specified (--min-size=1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2) Only warm buckets can be merged. Cold, hot and frozen buckets cannot be merged.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The count of 300 is most likely due to this parameter maxWarmDBCount. The default is only 300 warm buckets. Once exceeded, Splunk will roll the warm buckets to cold, and you will not be able to merge them. For your test, you can change this to a really large number.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;maxWarmDBCount = &amp;lt;nonnegative integer&amp;gt;
* The maximum number of warm buckets.
* Warm buckets are located in the 'homePath' for the index.
* If set to zero, splunkd does not retain any warm buckets
  It rolls the buckets to cold as soon as it is able.
* Splunkd ignores this setting on remote storage enabled indexes.
* Highest legal value is 4294967295.
* Default: 300&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;This is the link to the official docs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.1/Troubleshooting/CommandlinetoolsforusewithSupport" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.1/Troubleshooting/CommandlinetoolsforusewithSupport&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would recommend also adding the following parameters --dryrun and --debug.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;~/splunk/bin/splunk merge-buckets --index-name=testbuckets2 --min-size=1 --max-count=1000 --dryrun --debug&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 00:56:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Why-does-merge-buckets-only-merge-up-to-300-buckets/m-p/613541#M13946</guid>
      <dc:creator>hytan</dc:creator>
      <dc:date>2022-09-19T00:56:58Z</dc:date>
    </item>
  </channel>
</rss>

