SHA256
rewrote the formula
This commit is contained in:
1 parent
426a9c36ed
commit
11052fbd96
1 file changed
+11
-21
@@ -1,28 +1,18 @@
|
||||
# Read / Write Capacity Units
|
||||
This is for [[_DynamoDB|DynamoDB]].
|
||||
|
||||
## Writing
|
||||
Math goes sort of like this:
|
||||
The general formula for $CU$s is
|
||||
$$
|
||||
\begin{aligned}
|
||||
w &= \text{write} \\
|
||||
tw &= \text{transactional write} \\
|
||||
\ \\
|
||||
1\ WCU &= 1\ kb/w/s \\
|
||||
2\ WCU &= 1\ kb/tw/s \\
|
||||
\end{aligned}
|
||||
$$
|
||||
Take away is that a 1KB write is 1WCU. And a 1KB [transactional]{.underline} write is 2WCU.
|
||||
## Reading
|
||||
The math for reading is a little bit more convoluted, because the reads are divided by 4KB blocks.
|
||||
$$
|
||||
\begin{aligned}
|
||||
cr &= \text{consistent read} \\
|
||||
ecr &= \text{eventually consistent read} \\
|
||||
tr &= \text{transactional read} \\
|
||||
\ \\
|
||||
1\ RCU &= 4kb/cr/s \\
|
||||
\frac{1}{2}\ RCU &= 4kb/ecr/s \\
|
||||
2 RCU &= 4kb/tr/s
|
||||
rHz =& \frac{kCU / m}{ceil(nKB/bKB)} \\\ \\
|
||||
kCU =& ceil(nKB / bKB) \times rHz \times m \\\ \\
|
||||
\text{where:} \\
|
||||
nKB =& \text{ input size in KB} \\
|
||||
bKB =& \text{ operation block size: 1KB for Writes and 4KB for Reads} \\
|
||||
rHz =& \text{ request rate} \\
|
||||
m =& \text{ modifier: } \\
|
||||
&0.5\text{ for eventually consistent operations, } \\
|
||||
&1\text{ for normal operations, } \\
|
||||
&2\text{ for transactional operations}
|
||||
\end{aligned}
|
||||
$$
|
||||
Reference in new issue
Block a user