kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 78f817fd23f6904a5ba0f39f9b7cd0294601512de08f6fa2ff834e5d87d3db59 |
|---|---|
| Author | Andrew Tolbert <andrew.tolbert@datastax.com> · 2016-04-29 14:49 -05:00 |
| Committer | Andrew Tolbert <andrew.tolbert@datastax.com> · 2016-04-29 14:49 -05:00 |
| Parents | 67bdb486c55a |
1 file changed
modified driver-core/src/test/java/com/datastax/driver/core/CCMCache.java +3 −3
| @@ -271,10 +271,10 @@ | ||
| 271 | 271 | // CCM nodes are started with -Xms500M -Xmx500M |
| 272 | 272 | // and allocate up to 100MB non-heap memory in the general case, |
| 273 | 273 | // to be conservative we treat 1 "slot" as 800Mb. |
| 274 | - // We leave 2 slots out to avoid starving system memory, | |
| 274 | + // We leave 3 slots out to avoid starving system memory, | |
| 275 | 275 | // and we pick a value with a minimum of 1 slot and a maximum of 8 slots. |
| 276 | - // For example, an 8GB VM with ~6.5GB currently available heap will yield 6 slots ((6500/800) - 2 = 6). | |
| 277 | - long slotsAvailable = (freeMemoryMB / ONE_CCM_NODE_MB) - 2; | |
| 276 | + // For example, an 8GB VM with ~6.5GB currently available heap will yield 5 slots ((6500/800) - 3 = 5). | |
| 277 | + long slotsAvailable = (freeMemoryMB / ONE_CCM_NODE_MB) - 3; | |
| 278 | 278 | maximumWeight = Math.min(8, Math.max(1, slotsAvailable)); |
| 279 | 279 | } else { |
| 280 | 280 | maximumWeight = Integer.parseInt(numberOfNodes); |