<div dir="ltr">That formula doesn't make sense to me? 4097 seems to be a magic number in there? what does 2 ^ 12 have to do with anything?<div><br></div><div>You can't *really* say how many objects will be in a partition without thinking about how many objects will be in the cluster. But number of partitions per disk (2^part_power * replica_count / number_of_drives) can be informative.</div>
<div><br></div><div>For example, if you've only got 50 disks and you're running a big 'ol part power like 18, then as soon as you get a few 100K objects in your swift cluster you'll have near full coverage in the partition space and can expect ~15K partitions on each disk. That's 15,000 top-level directories in /srv/node/sdX/objects - and under each ahead of the .data file you have a part/suffix/hash directories to boot!</div>
<div><br></div><div>With a part power of 17 that top-level directory count on those 50 devices (which is like what - 3 or 4 servers?) drops down to a much more manageable 7864. Which could easily scale up almost TWO orders of magnitude, 80x or so at least, to 3,000-4,000 drives before you'll be worried too much about lumpy drive utilization that might pop up as the partition count per drives falls off depending on the distribution of your object size.</div>
<div><br></div><div>If you just want to estimate the number of objects on a single disk, assuming your disks are all the same size (*and* you have *either* roughly even sized zones & regions *or* your number of zones and/or number of regions are >= number of replicas) you can just say:</div>
<div><br></div><div>number of objects in cluster / number of devices in cluster</div><div><br></div><div>^ nothing magic, swift's placement strategy tries pretty hard to be well distributed even as you add and remove capacity things will try to even out.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 24, 2014 at 8:25 PM, Remo Mattei <span dir="ltr"><<a href="mailto:remo@italy1.com" target="_blank">remo@italy1.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi again, <div>I have read about this formula can someone enhance with some additional details about how many objects can be in a swift cluster?</div><div><br></div><div><br></div><div>
<div style="margin-top:6.72pt;margin-bottom:0pt;margin-left:0.38in;direction:ltr;word-break:normal"><span style="font-size:28.0pt"><span style="color:#cc0000;font-family:Wingdings">§</span></span><span style="font-size:28pt;font-family:'Liberation Sans'">To
find out how many items a partition will hold use the following formula</span></div>
<div style="margin-top:5.76pt;margin-bottom:0pt;margin-left:0.81in;direction:ltr;word-break:normal"><span style="font-size:24.0pt"><span style="color:#cc0000;font-family:Wingdings">§</span></span><span style="font-size:24pt;font-family:'Liberation Sans'">For
</span><span style="font-size:24pt;font-family:'Liberation Sans'">example,
if the </span></div>
<div style="margin-top:5.76pt;margin-bottom:0pt;margin-left:0.81in;direction:ltr;word-break:normal"><span style="font-size:24.0pt"><span style="color:#cc0000;font-family:Wingdings">§</span></span><span style="font-size:24pt;font-family:'Liberation Sans'">partition
</span><span style="font-size:24pt;font-family:'Liberation Sans'">num
is </span><span style="font-size:24pt;font-family:'Liberation Sans'">2^18, </span></div>
<div style="margin-top:5.76pt;margin-bottom:0pt;margin-left:0.81in;direction:ltr;word-break:normal"><span style="font-size:24.0pt"><span style="color:#cc0000;font-family:Wingdings">§</span></span><span style="font-size:24pt;font-family:'Liberation Sans'">replica_num</span><span style="font-size:24pt;font-family:'Liberation Sans'">
</span><span style="font-size:24pt;font-family:'Liberation Sans'">is
</span><span style="font-size:24pt;font-family:'Liberation Sans'">3,</span></div>
<div style="margin-top:5.76pt;margin-bottom:0pt;margin-left:0.81in;direction:ltr;word-break:normal"><span style="font-size:24.0pt"><span style="color:#cc0000;font-family:Wingdings">§</span></span><span style="font-size:24pt;font-family:'Liberation Sans'">disk_num</span><span style="font-size:24pt;font-family:'Liberation Sans'">
</span><span style="font-size:24pt;font-family:'Liberation Sans'">is
50, </span></div>
<div style="margin-top:5.76pt;margin-bottom:0pt;margin-left:0.81in;direction:ltr;word-break:normal"><span style="font-size:24.0pt"><span style="color:#cc0000;font-family:Wingdings">§</span></span><span style="font-size:24pt;font-family:'Liberation Sans'">item_num</span><span style="font-size:24pt;font-family:'Liberation Sans'">
</span><span style="font-size:24pt;font-family:'Liberation Sans'">~=
</span><span style="font-size:24pt;font-family:'Liberation Sans'">2^18
</span><span style="font-size:24pt;font-family:'Liberation Sans'">*
3 * 4097 / 50 ~= 64440238.</span></div>
<br></div></div><br>_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
<br></blockquote></div><br></div>