Apache Kafka Broker Disk Storage, Replication & Partition Throughput Calculator

Compute Kafka cluster disk TB (with Replication Factor), network MB/s, and optimal partition count.

Total Replicated Cluster Disk Storage 38.02 TB
Uncompressed Producer Ingress Rate 48.828 MB/s
Replicated Disk Write Throughput 65.918 MB/s
Recommended Topic Partitions 15 partitions
Inputs
Try:
msg/sec
Average producer message ingestion rate (messages/sec).
KB
Average uncompressed payload size per message in KB.
days
Topic log retention period in days.
replicas
Broker replication factor (typically 3 for production durability).
ratio
LZ4 / Zstandard compression ratio (0.45 = 55% size reduction; 1.0 = uncompressed).
Results & Graph
Total Replicated Cluster Disk Storage
38.02 TB
Uncompressed Producer Ingress Rate
48.828 MB/s
Replicated Disk Write Throughput
65.918 MB/s
Recommended Topic Partitions
15 partitions

Total Replicated Cluster Disk Storage

Graph 1 • How the inputs feed Kafka Storage & Partitions
Apache Kafka Broker Disk Storage, Replication & Partition Throughput Calculator • Custom Domain Schematic (AI, Cloud & Distributed Systems) eventsPeaverageMOut Events Per Second: 25.0k msg/sec • Average Message Size Kb: 2 KB TOTAL REPLICATED CLUSTER D 38.02 TB • Uncompressed Producer : 48.828 MB/s • Replicated Disk Write : 65.918 MB/s Eq: Ingress_MB_s = (EventsPerSec × A
Graph 2 • Total Replicated Cluster Disk Storage as Events Per Second changes (40% to 160% of current)
0 TB 33.46 TB 66.92 TB 15.21 10.0k 22.81 15.0k 30.42 20.0k 38.02 25.0k 45.62 30.0k 53.23 35.0k 60.83 40.0k
Graph 3 • Events Per Second and Average Message Size Kb together Compares Total Replicated Cluster Disk Storage when Average Message Size Kb is shifted +25% (solid) vs. −25% (dashed).
0 TB 33.98 TB 67.96 TB --- Average Message Size Kb @ 75% 33.27 -30% 40.40 -15% 47.52 +0% 54.65 +15% 61.78 +30%
Summary: 25,000 msg/s (48.8 MB/s uncompressed ingress) retained for 7 days at RF=3 and 0.45× compression requires 38.02 TB of broker disk across ~15 partitions.
Summary: 25,000 msg/s (48.8 MB/s uncompressed ingress) retained for 7 days at RF=3 and 0.45× compression requires 38.02 TB of broker disk across ~15 partitions.
Interactive chart & math engine powered by CalculatorGraph

Formula: Kafka Storage & Partitions Formula

IngressMBs = (EventsPerSec × AvgMessageKB) / 1024
ClusterStorageTiB = IngressMiBs × 86400 × RetentionDays × ReplicationFactor × CompressionRatio / 1024²
Partitions = max(6, ⌈IngressMiBs ÷ 10⌉ × 3)
Ingress_MB_s = (EventsPerSec × AvgMessageKB) / 1024; ClusterStorage_TiB = Ingress_MiB_s × 86400 × RetentionDays × ReplicationFactor × CompressionRatio / 1024²; Partitions = max(6, ⌈Ingress_MiB_s ÷ 10⌉ × 3)
  • eventsPerSecond: Average producer message ingestion rate (messages/sec).
  • averageMessageSizeKb: Average uncompressed payload size per message in KB.
  • retentionPeriodDays: Topic log retention period in days.
  • replicationFactor: Broker replication factor (typically 3 for production durability).
  • compressionRatioFactor: LZ4 / Zstandard compression ratio (0.45 = 55% size reduction; 1.0 = uncompressed).

Frequently Asked Questions

Why does the partition count jump from 15 to 18 rather than going to 16?

The engine rounds the ingress divided by 10 up to a whole number and then multiplies by three. Any ingress between just over 40 and 50 MB/s gives 15, and anything just over 50 gives 18. The steps come from that rounding. If you want a count that is not a multiple of three, calculate one from your own measured per-partition rates.

Does a higher replication factor need more partitions?

Not on this page, and usually not in practice. Replication adds follower copies of each partition, which raises disk writes and network traffic, but consumers still read only from the leader. Moving from a replication factor of 3 to 2 drops storage from 38.02 TB to 25.347 TB while the partition count stays at 15.

Is the ingress figure compressed or uncompressed?

Uncompressed. The 48.828 MB/s line is message rate times average payload size, divided by 1024 to give MB. The compression factor only enters the replicated write rate and the storage figure. If you measure per-partition throughput on compressed traffic, multiply the ingress by your compression factor before dividing, or the partition count will come out too high.

How many consumers can read the topic in parallel?

Within one consumer group, at most one member per partition. With 15 partitions, a group of 15 consumers is the most that will all receive work, and a 16th will sit idle. Separate consumer groups each get their own full copy of the stream, so the limit applies per group, not to the topic as a whole.

Why does the page still recommend 6 partitions for a very quiet topic?

The engine has a floor of 6. A topic with about 2 MB/s of ingress would need only three partitions by the rule of three per 10 MB/s, but the floor lifts it. Six gives room for some consumer parallelism and future growth. A topic that will always be tiny can use fewer if you do not need parallel readers.

Should I size partitions on average or peak message rate?

On peak. Partitions have to absorb the busiest period without the consumer group falling behind. If 25,000 messages a second is your daily average and the evening peak runs at twice that, put the peak figure into the page. The storage figure is the one case where the average rate gives a better answer.

What does replicated disk write throughput tell me?

It is the total rate of bytes written to disk across every broker, counting leader and follower copies after compression. In the default it is 65.918 MB/s. Divide it by your broker count for a rough per-broker figure, assuming leadership is balanced. It does not include page cache effects, index files or log compaction.

Why is the storage figure in TB slightly different from my own calculation?

The engine divides by 1024 at each step, as the page formula states, so its TB is really a tebibyte. If you divide by a million instead, the decimal convention disk vendors use, the default comes out near 39.87 rather than 38.02. Neither figure includes free-space headroom, so add a margin of your own before ordering disks.

Will doubling the message size double the partitions?

Roughly. At 4 KB and 25,000 messages a second, ingress is 97.656 MB/s and the page recommends 30 partitions, twice the default 15. Real brokers handle a few large messages more efficiently than many small ones, so measured throughput per partition may rise with message size and the doubling may be more than you need.

Does compression change the recommended partitions?

Not here. The partition line uses the uncompressed ingress, so a compression factor of 0.45 or 1.0 both give 15 partitions on the default inputs. Compression does reduce the bytes each partition stores and replicates, which is why the storage line moves. If your load tests use compressed data, adjust the ingress yourself before applying the rule.

Can I add partitions later instead of over-provisioning now?

You can, but keyed messages will then map to different partitions, which breaks per-key ordering across the change and can surprise stateful consumers. Topics without keys are less affected. Many teams pick a count with some headroom at the start, guided by measured consumer rates, so that a repartition is not needed when traffic grows.

Does the page account for broker count?

No. There is no broker input, and the partition and storage figures are cluster totals. Divide the replicated write rate and the storage figure by your broker count for per-broker estimates, assuming leaders and replicas are spread evenly. Choosing a partition count that divides evenly by the number of brokers makes that assumption more realistic.

Fifteen partitions from 48.8 MB/s of producer traffic

The starting topic receives 25,000 messages a second, each about 2 KB before compression. Multiply the two and divide by 1024 and you get the first supporting line: 48.828 MB/s of uncompressed producer ingress. Every other figure on the page is built from that number.

The partition recommendation is simple once you see it. The engine divides the ingress by 10, rounds up to a whole number, and multiplies by three. Here 48.828 divided by 10 is 4.88, which rounds up to 5, and 5 times three is 15. There is also a floor: the page never recommends fewer than 6 partitions, however quiet the topic.

So the 15 on the result card is not derived from your brokers, your consumers or your replication factor. It is a rule of thumb of three partitions for each started block of 10 MB/s of raw producer traffic. That works as a first sketch for a new topic. It is not a substitute for measuring what one partition can actually carry on your hardware with your client settings.

The preset comparisons show the steps clearly. At 15,000 messages a second the ingress is 29.297 MB/s and the page recommends 9 partitions. At 37,500 messages a second it is 73.242 MB/s and 24 partitions. The count moves in jumps of three, never one at a time.

Reading the rule as a per-partition rate

Three partitions per 10 MB/s works out to roughly 3.3 MB/s of uncompressed traffic per partition. That is a cautious figure. Many clusters push well beyond it on the producer side, but the number of partitions is often set by the consumer side, where each partition can only be read by one member of a consumer group at a time.

Because the engine rounds up before multiplying, the effective rate per partition swings with the traffic. At 48.828 MB/s over 15 partitions each one carries about 3.26 MB/s. At 29.297 MB/s over 9 partitions it is about 3.26 as well. Push the traffic to just over 50 MB/s and the count jumps to 18, dropping the load per partition to about 2.8 MB/s. Those steps are an artefact of the rounding, not a property of Kafka.

The floor of 6 matters for small topics. A topic with about 2 MB/s of ingress still gets 6 partitions, which is about a third of a MB/s each. That is plenty of headroom, and it leaves room for six consumers in a group from day one. If you know a topic will stay tiny and never needs parallel consumers, fewer partitions are fine, and the page's floor can be ignored.

Checking the count against producer and consumer rates you measured

A sounder way to size partitions is to measure two rates on your own setup: how many MB/s one partition can accept from producers, and how many MB/s one consumer can process from one partition. Then divide the target throughput by each rate, round both up, and take the larger. Consumers usually set the answer, because they do real work on each message.

Here is that arithmetic with the default ingress and two example measurements. Suppose a producer test shows 10 MB/s per partition and a consumer that writes to a database manages 4 MB/s per partition. The producer side needs 48.828 divided by 10, rounded up to 5 partitions. The consumer side needs 48.828 divided by 4, which is 12.2, rounded up to 13. The topic needs 13, slightly fewer than the page's 15.

Change the consumer to something slower, say 2 MB/s per partition because each message triggers an API call, and the consumer side needs 25 partitions. Now the page's 15 is too few, and the consumer group will fall behind at peak no matter how many members you add. Members beyond the partition count sit idle.

If your rates are measured on compressed data, divide the compressed throughput rather than the raw 48.828. Be consistent: the page's ingress line is always uncompressed.

Ingress, replicated writes and the traffic the page does not total

The second supporting line, replicated disk write throughput, is 65.918 MB/s in the default. That is the raw ingress of 48.828 multiplied by the compression factor of 0.45 and then by the replication factor of 3. It is the rate at which bytes land on disk across the whole cluster, leaders and followers together.

Split it by broker to see what each disk faces. On a three-broker cluster with even leadership, each broker writes about a third of that total, near 22 MB/s. That is a modest load for modern disks, which suggests storage capacity rather than disk speed is the binding constraint for this workload.

Network is where the page says the least. Replication sends each compressed byte from the leader to every follower, so with a replication factor of 3 there are two copies crossing the network for each produced byte. Consumers add more: each consumer group reads the whole stream, so three groups mean roughly three times the compressed ingress going out. None of that is on the card. If you have several downstream systems, add their reads yourself before choosing network capacity.

The storage line and its binary units

The headline figure, 38.02 TB, is the replicated write rate held for the retention period. By hand: 65.918 MB/s times 86400 seconds times 7 days, then divided by 1024 twice. The engine uses binary units throughout, so the result is strictly in tebibytes even though the card says TB.

The formula shown on the page says the same thing: storage in TiB, divided by 1024 squared. A vendor quoting in decimal terabytes counts a million MB to the TB, so convert before you compare. Dividing by a million instead of 1024 squared turns the default into about 39.87 decimal TB, a little under 5% more, and that larger figure is the safer one to take to a disk order.

Storage scales in straight lines with each setting. Retention of 3 days gives 16.294 TB. A replication factor of 2 gives 25.347 TB. Turning compression off, with a factor of 1, gives 84.49 TB. Retention is held at a minimum of one day, so entering half a day still returns 5.431 TB, the one-day figure.

Retention-driven storage planning, with free-space margins and segment overhead, is a separate exercise. This page is most useful for the throughput and partition side, with the storage line as a rough check that the cluster you are sizing for traffic can also hold a week of data.

Message size and message count trade places

The page only cares about bytes per second. Halve the message size to 1 KB at the same 25,000 messages a second and ingress drops to 24.414 MB/s, the partition count to 9 and storage to 19.01 TB. Double it to 4 KB and ingress reaches 97.656 MB/s, with 30 partitions and 76.041 TB of storage.

Real brokers do not behave quite that neatly. Many small messages cost more CPU and more request handling per MB than a few large ones, because each record carries headers and each produce request has fixed overhead. Producer batching with a short linger time softens this. If your messages are well under a kilobyte, expect the true limit per partition to be lower than a byte-only rule suggests.

Large messages bring the opposite problem. Kafka is tuned for messages in the kilobyte range. Payloads of several megabytes need broker and client size limits raised and can make consumer lag uneven. A common pattern is to store big blobs elsewhere and send a reference through the topic.

Settings the partition count ignores

Changing the replication factor, the compression ratio or the retention period moves the storage line but leaves the partition count at 15. That is reasonable for replication and retention, which do not change how fast a single partition is read. It is less reasonable for compression, since a well-compressed stream moves fewer bytes per partition.

The engine also has no idea how keys are spread. If one customer or device produces a large share of the traffic and you key by that field, its partition takes far more than an even share. Fifteen partitions on paper may behave like ten in practice. Look at the distribution of keys before trusting any even-split figure.

Finally, think about the future. You can add partitions to a topic later, but doing so changes which partition a given key maps to. Systems that rely on per-key ordering can see records for the same key split across two partitions during the change. That is a good reason to round the count up at the start rather than plan on growing it.

Turning the figures into a topic plan

Start with the ingress line, since it rests on two numbers you can check: message rate and average size. Use the peak rate rather than the daily average, because partitions must cope with the busiest hour. If you only know the average, the page will understate what you need.

Next, run a short load test to get your per-partition producer and consumer rates, and apply the larger-of-two rule. Compare that with the page's figure. If the two agree, you have a sensible count. If your measured consumer rate is low, trust the measurement over the rule of thumb.

Spread partitions evenly over brokers where you can. Fifteen partitions on three brokers gives five leaders each, which keeps load balanced when one broker restarts and leadership moves. Then use the replicated write rate, 65.918 MB/s in the default, and your consumer group count to check disk and network on each broker. The storage line tells you whether the disks you need for throughput are also big enough for the retention window.