Skip to content

Commit cd50015

Browse files
committed
Fix too long row issue
1 parent 084153e commit cd50015

6 files changed

+117
-140
lines changed

Directives.md

+14-4
Original file line numberDiff line numberDiff line change
@@ -1016,10 +1016,20 @@ generate hash code. The key/value of shared hash map can be `int`,`long`,`String
10161016

10171017
**limitation**
10181018

1019-
type | entry structure size(Bytes)| table structure size(Bytes)| space limit |entries limit| key limit| value limit|
1020-
------------ | -----------|-----------|-------------|------------|--------------------|---------------------
1021-
tiny map |24 |entries x 4| 4G or 2G (32-bit)| 2^31=2.14Billions | 16M | 4G or 2G (32-bit) |
1022-
hash map |40 or 28(32bit)|entries x 8 or 4 (32-bit) |OS limit| 2^63 or 2^31 (32-bit)| OS limit | OS limit |
1019+
1. Tiny Map
1020+
* entries number limit: 2^31=2.14Billions
1021+
* total space limit : 4G (64-bit) / 2G (32-bit)
1022+
* key size limit: 16M
1023+
* value size limit: 4G (64-bit) / 2G (32-bit)
1024+
* entry structure cost: 24 Bytes
1025+
* table structure cost: entries x 4 Bytes
1026+
1. Hash Map
1027+
* entries number limit: 2^63 (64-bit) / 2^31 (32-bit)
1028+
* total space limit : OS limit
1029+
* key size limit: OS limit
1030+
* value size limit: OS limit
1031+
* entry structure cost: 40 Bytes (64-bit) / 28 Bytes (32-bit)
1032+
* table structure cost: entries x 8 Bytes (64-bit) / entries x 4 (32-bit)
10231033

10241034
But note that if needed memory size is less than half of OS page size the real allocated size of nginx slab only can be
10251035
2^3 = 8, 2^4 = 16, 2^5 = 32,..., 2^(ngx_pagesize_shift - 1).So on 64-bit OS entry structure size of tiny map really

Directives.md.html

+22-33
Original file line numberDiff line numberDiff line change
@@ -1003,39 +1003,28 @@ <h2>
10031003
So far it has two implementations: tiny map &amp; hash map both of which use MurmurHash3 32-bit to
10041004
generate hash code. The key/value of shared hash map can be <code>int</code>,<code>long</code>,<code>String</code>, <code>byte array</code>.</p>
10051005
<p><strong>limitation</strong></p>
1006-
<table>
1007-
<thead>
1008-
<tr>
1009-
<th>type</th>
1010-
<th>entry structure size(Bytes)</th>
1011-
<th>table structure size(Bytes)</th>
1012-
<th>space limit</th>
1013-
<th>entries limit</th>
1014-
<th>key limit</th>
1015-
<th>value limit</th>
1016-
</tr>
1017-
</thead>
1018-
<tbody>
1019-
<tr>
1020-
<td>tiny map</td>
1021-
<td>24</td>
1022-
<td>entries x 4</td>
1023-
<td>4G or 2G (32-bit)</td>
1024-
<td>2^31=2.14Billions</td>
1025-
<td>16M</td>
1026-
<td>4G or 2G (32-bit)</td>
1027-
</tr>
1028-
<tr>
1029-
<td>hash map</td>
1030-
<td>40 or 28(32bit)</td>
1031-
<td>entries x 8 or 4 (32-bit)</td>
1032-
<td>OS limit</td>
1033-
<td>2^63 or 2^31 (32-bit)</td>
1034-
<td>OS limit</td>
1035-
<td>OS limit</td>
1036-
</tr>
1037-
</tbody>
1038-
</table>
1006+
<ol>
1007+
<li>Tiny Map
1008+
<ul>
1009+
<li>entries number limit: 2^31=2.14Billions</li>
1010+
<li>total space limit : 4G (64-bit) / 2G (32-bit)</li>
1011+
<li>key size limit: 16M</li>
1012+
<li>value size limit: 4G (64-bit) / 2G (32-bit)</li>
1013+
<li>entry structure cost: 24 Bytes</li>
1014+
<li>table structure cost: entries x 4 Bytes</li>
1015+
</ul>
1016+
</li>
1017+
<li>Hash Map
1018+
<ul>
1019+
<li>entries number limit: 2^63 (64-bit) / 2^31 (32-bit)</li>
1020+
<li>total space limit : OS limit</li>
1021+
<li>key size limit: OS limit</li>
1022+
<li>value size limit: OS limit</li>
1023+
<li>entry structure cost: 40 Bytes (64-bit) / 28 Bytes (32-bit)</li>
1024+
<li>table structure cost: entries x 8 Bytes (64-bit) / entries x 4 (32-bit)</li>
1025+
</ul>
1026+
</li>
1027+
</ol>
10391028
<p>But note that if needed memory size is less than half of OS page size the real allocated size of nginx slab only can be
10401029
2^3 = 8, 2^4 = 16, 2^5 = 32,..., 2^(ngx_pagesize_shift - 1).So on 64-bit OS entry structure size of tiny map really
10411030
uses 32Bytes hash map uses 64Bytes. We'll do some optimize work in the future versions.</p>

SharedMap.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,21 @@ generate hash code. The key/value of shared hash map can be `int`,`long`,`String
1010

1111
**limitation**
1212

13-
type | entry structure size(Bytes)| table structure size(Bytes)| space limit |entries limit| key limit| value limit|
14-
------------ | -----------|-----------|-------------|------------|--------------------|---------------------
15-
tiny map |24 |entries x 4| 4G or 2G (32-bit)| 2^31=2.14Billions | 16M | 4G or 2G (32-bit) |
16-
hash map |40 or 28(32bit)|entries x 8 or 4 (32-bit) |OS limit| 2^63 or 2^31 (32-bit)| OS limit | OS limit |
13+
14+
1. Tiny Map
15+
* entries number limit: 2^31=2.14Billions
16+
* total space limit : 4G (64-bit) / 2G (32-bit)
17+
* key size limit: 16M
18+
* value size limit: 4G (64-bit) / 2G (32-bit)
19+
* entry structure cost: 24 Bytes
20+
* table structure cost: entries x 4 Bytes
21+
1. Hash Map
22+
* entries number limit: 2^63 (64-bit) / 2^31 (32-bit)
23+
* total space limit : OS limit
24+
* key size limit: OS limit
25+
* value size limit: OS limit
26+
* entry structure cost: 40 Bytes (64-bit) / 28 Bytes (32-bit)
27+
* table structure cost: entries x 8 Bytes (64-bit) / entries x 4 (32-bit)
1728

1829
But note that if needed memory size is less than half of OS page size the real allocated size of nginx slab only can be
1930
2^3 = 8, 2^4 = 16, 2^5 = 32,..., 2^(ngx_pagesize_shift - 1).So on 64-bit OS entry structure size of tiny map really

SharedMap.md.html

+22-33
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,28 @@ <h2>
77
So far it has two implementations: tiny map &amp; hash map both of which use MurmurHash3 32-bit to
88
generate hash code. The key/value of shared hash map can be <code>int</code>,<code>long</code>,<code>String</code>, <code>byte array</code>.</p>
99
<p><strong>limitation</strong></p>
10-
<table>
11-
<thead>
12-
<tr>
13-
<th>type</th>
14-
<th>entry structure size(Bytes)</th>
15-
<th>table structure size(Bytes)</th>
16-
<th>space limit</th>
17-
<th>entries limit</th>
18-
<th>key limit</th>
19-
<th>value limit</th>
20-
</tr>
21-
</thead>
22-
<tbody>
23-
<tr>
24-
<td>tiny map</td>
25-
<td>24</td>
26-
<td>entries x 4</td>
27-
<td>4G or 2G (32-bit)</td>
28-
<td>2^31=2.14Billions</td>
29-
<td>16M</td>
30-
<td>4G or 2G (32-bit)</td>
31-
</tr>
32-
<tr>
33-
<td>hash map</td>
34-
<td>40 or 28(32bit)</td>
35-
<td>entries x 8 or 4 (32-bit)</td>
36-
<td>OS limit</td>
37-
<td>2^63 or 2^31 (32-bit)</td>
38-
<td>OS limit</td>
39-
<td>OS limit</td>
40-
</tr>
41-
</tbody>
42-
</table>
10+
<ol>
11+
<li>Tiny Map
12+
<ul>
13+
<li>entries number limit: 2^31=2.14Billions</li>
14+
<li>total space limit : 4G (64-bit) / 2G (32-bit)</li>
15+
<li>key size limit: 16M</li>
16+
<li>value size limit: 4G (64-bit) / 2G (32-bit)</li>
17+
<li>entry structure cost: 24 Bytes</li>
18+
<li>table structure cost: entries x 4 Bytes</li>
19+
</ul>
20+
</li>
21+
<li>Hash Map
22+
<ul>
23+
<li>entries number limit: 2^63 (64-bit) / 2^31 (32-bit)</li>
24+
<li>total space limit : OS limit</li>
25+
<li>key size limit: OS limit</li>
26+
<li>value size limit: OS limit</li>
27+
<li>entry structure cost: 40 Bytes (64-bit) / 28 Bytes (32-bit)</li>
28+
<li>table structure cost: entries x 8 Bytes (64-bit) / entries x 4 (32-bit)</li>
29+
</ul>
30+
</li>
31+
</ol>
4332
<p>But note that if needed memory size is less than half of OS page size the real allocated size of nginx slab only can be
4433
2^3 = 8, 2^4 = 16, 2^5 = 32,..., 2^(ngx_pagesize_shift - 1).So on 64-bit OS entry structure size of tiny map really
4534
uses 32Bytes hash map uses 64Bytes. We'll do some optimize work in the future versions.</p>

directives.html

+22-33
Original file line numberDiff line numberDiff line change
@@ -1105,39 +1105,28 @@ <h2>
11051105
So far it has two implementations: tiny map &amp; hash map both of which use MurmurHash3 32-bit to
11061106
generate hash code. The key/value of shared hash map can be <code>int</code>,<code>long</code>,<code>String</code>, <code>byte array</code>.</p>
11071107
<p><strong>limitation</strong></p>
1108-
<table>
1109-
<thead>
1110-
<tr>
1111-
<th>type</th>
1112-
<th>entry structure size(Bytes)</th>
1113-
<th>table structure size(Bytes)</th>
1114-
<th>space limit</th>
1115-
<th>entries limit</th>
1116-
<th>key limit</th>
1117-
<th>value limit</th>
1118-
</tr>
1119-
</thead>
1120-
<tbody>
1121-
<tr>
1122-
<td>tiny map</td>
1123-
<td>24</td>
1124-
<td>entries x 4</td>
1125-
<td>4G or 2G (32-bit)</td>
1126-
<td>2^31=2.14Billions</td>
1127-
<td>16M</td>
1128-
<td>4G or 2G (32-bit)</td>
1129-
</tr>
1130-
<tr>
1131-
<td>hash map</td>
1132-
<td>40 or 28(32bit)</td>
1133-
<td>entries x 8 or 4 (32-bit)</td>
1134-
<td>OS limit</td>
1135-
<td>2^63 or 2^31 (32-bit)</td>
1136-
<td>OS limit</td>
1137-
<td>OS limit</td>
1138-
</tr>
1139-
</tbody>
1140-
</table>
1108+
<ol>
1109+
<li>Tiny Map
1110+
<ul>
1111+
<li>entries number limit: 2^31=2.14Billions</li>
1112+
<li>total space limit : 4G (64-bit) / 2G (32-bit)</li>
1113+
<li>key size limit: 16M</li>
1114+
<li>value size limit: 4G (64-bit) / 2G (32-bit)</li>
1115+
<li>entry structure cost: 24 Bytes</li>
1116+
<li>table structure cost: entries x 4 Bytes</li>
1117+
</ul>
1118+
</li>
1119+
<li>Hash Map
1120+
<ul>
1121+
<li>entries number limit: 2^63 (64-bit) / 2^31 (32-bit)</li>
1122+
<li>total space limit : OS limit</li>
1123+
<li>key size limit: OS limit</li>
1124+
<li>value size limit: OS limit</li>
1125+
<li>entry structure cost: 40 Bytes (64-bit) / 28 Bytes (32-bit)</li>
1126+
<li>table structure cost: entries x 8 Bytes (64-bit) / entries x 4 (32-bit)</li>
1127+
</ul>
1128+
</li>
1129+
</ol>
11411130
<p>But note that if needed memory size is less than half of OS page size the real allocated size of nginx slab only can be
11421131
2^3 = 8, 2^4 = 16, 2^5 = 32,..., 2^(ngx_pagesize_shift - 1).So on 64-bit OS entry structure size of tiny map really
11431132
uses 32Bytes hash map uses 64Bytes. We'll do some optimize work in the future versions.</p>

sharedmap.html

+22-33
Original file line numberDiff line numberDiff line change
@@ -109,39 +109,28 @@ <h2>
109109
So far it has two implementations: tiny map &amp; hash map both of which use MurmurHash3 32-bit to
110110
generate hash code. The key/value of shared hash map can be <code>int</code>,<code>long</code>,<code>String</code>, <code>byte array</code>.</p>
111111
<p><strong>limitation</strong></p>
112-
<table>
113-
<thead>
114-
<tr>
115-
<th>type</th>
116-
<th>entry structure size(Bytes)</th>
117-
<th>table structure size(Bytes)</th>
118-
<th>space limit</th>
119-
<th>entries limit</th>
120-
<th>key limit</th>
121-
<th>value limit</th>
122-
</tr>
123-
</thead>
124-
<tbody>
125-
<tr>
126-
<td>tiny map</td>
127-
<td>24</td>
128-
<td>entries x 4</td>
129-
<td>4G or 2G (32-bit)</td>
130-
<td>2^31=2.14Billions</td>
131-
<td>16M</td>
132-
<td>4G or 2G (32-bit)</td>
133-
</tr>
134-
<tr>
135-
<td>hash map</td>
136-
<td>40 or 28(32bit)</td>
137-
<td>entries x 8 or 4 (32-bit)</td>
138-
<td>OS limit</td>
139-
<td>2^63 or 2^31 (32-bit)</td>
140-
<td>OS limit</td>
141-
<td>OS limit</td>
142-
</tr>
143-
</tbody>
144-
</table>
112+
<ol>
113+
<li>Tiny Map
114+
<ul>
115+
<li>entries number limit: 2^31=2.14Billions</li>
116+
<li>total space limit : 4G (64-bit) / 2G (32-bit)</li>
117+
<li>key size limit: 16M</li>
118+
<li>value size limit: 4G (64-bit) / 2G (32-bit)</li>
119+
<li>entry structure cost: 24 Bytes</li>
120+
<li>table structure cost: entries x 4 Bytes</li>
121+
</ul>
122+
</li>
123+
<li>Hash Map
124+
<ul>
125+
<li>entries number limit: 2^63 (64-bit) / 2^31 (32-bit)</li>
126+
<li>total space limit : OS limit</li>
127+
<li>key size limit: OS limit</li>
128+
<li>value size limit: OS limit</li>
129+
<li>entry structure cost: 40 Bytes (64-bit) / 28 Bytes (32-bit)</li>
130+
<li>table structure cost: entries x 8 Bytes (64-bit) / entries x 4 (32-bit)</li>
131+
</ul>
132+
</li>
133+
</ol>
145134
<p>But note that if needed memory size is less than half of OS page size the real allocated size of nginx slab only can be
146135
2^3 = 8, 2^4 = 16, 2^5 = 32,..., 2^(ngx_pagesize_shift - 1).So on 64-bit OS entry structure size of tiny map really
147136
uses 32Bytes hash map uses 64Bytes. We'll do some optimize work in the future versions.</p>

0 commit comments

Comments
 (0)