Merge pull request #611 from corda/merge/tudor-26-03

Merge OS
This commit is contained in:
Tudor Malene 2018-03-26 15:27:12 +01:00 committed by GitHub
commit eb73a3b68e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 10 deletions

View File

@ -136,14 +136,14 @@ Memory usage and tuning
All garbage collected programs can run faster if you give them more memory, as they need to collect less
frequently. As a default JVM will happily consume all the memory on your system if you let it, Corda is
configured with a relatively small 200mb Java heap by default. When other overheads are added, this yields
a total memory usage of about 500mb for a node (the overheads come from things like compiled code, metadata,
configured with a 512mb Java heap by default. When other overheads are added, this yields
a total memory usage of about 800mb for a node (the overheads come from things like compiled code, metadata,
off-heap buffers, thread stacks, etc).
If you want to make your node go faster and profiling suggests excessive GC overhead is the cause, or if your
node is running out of memory, you can give it more by running the node like this:
``java -Xmx1024m -jar corda.jar``
``java -Dcapsule.jvm.args="-Xmx1024m" -jar corda.jar``
The example command above would give a 1 gigabyte Java heap.

View File

@ -67,7 +67,7 @@ task buildCordaJAR(type: FatCapsule, dependsOn: project(':node').compileJava) {
// NOTE: these can be overridden in node.conf.
//
// If you change these flags, please also update Driver.kt
jvmArgs = ['-Xmx200m', '-XX:+UseG1GC']
jvmArgs = ['-Xmx512m', '-XX:+UseG1GC']
}
}

View File

@ -154,7 +154,7 @@ data class NodeParameters(
val verifierType: VerifierType = VerifierType.InMemory,
val customOverrides: Map<String, Any?> = emptyMap(),
val startInSameProcess: Boolean? = null,
val maximumHeapSize: String = "200m",
val maximumHeapSize: String = "512m",
val logLevel: String? = null
) {
fun withProvidedName(providedName: CordaX500Name?): NodeParameters = copy(providedName = providedName)

View File

@ -77,7 +77,7 @@ interface DriverDSL {
* in. If null the Driver-level value will be used.
* @param maximumHeapSize The maximum JVM heap size to use for the node as a [String]. By default a number is interpreted
* as being in bytes. Append the letter 'k' or 'K' to the value to indicate Kilobytes, 'm' or 'M' to indicate
* megabytes, and 'g' or 'G' to indicate gigabytes. The default value is "200m" = 200 megabytes.
* megabytes, and 'g' or 'G' to indicate gigabytes. The default value is "512m" = 512 megabytes.
* @return A [CordaFuture] on the [NodeHandle] to the node. The future will complete when the node is available.
*/
fun startNode(

View File

@ -225,7 +225,7 @@ class DriverDSLImpl(
verifierType: VerifierType,
customOverrides: Map<String, Any?>,
startInSameProcess: Boolean? = null,
maximumHeapSize: String = "200m",
maximumHeapSize: String = "512m",
p2pAddress: NetworkHostAndPort = portAllocation.nextHostAndPort()): CordaFuture<NodeHandle> {
val rpcAddress = portAllocation.nextHostAndPort()
val rpcAdminAddress = portAllocation.nextHostAndPort()
@ -376,7 +376,7 @@ class DriverDSLImpl(
)
val cordaConfig = typesafe.parseAsNodeConfiguration()
val config = NodeConfig(rawConfig, cordaConfig)
return startNodeInternal(config, webAddress, null, "200m", localNetworkMap)
return startNodeInternal(config, webAddress, null, "512m", localNetworkMap)
}
private fun queryWebserver(handle: NodeHandle, process: Process): WebserverHandle {
@ -638,7 +638,7 @@ class DriverDSLImpl(
monitorPort,
systemProperties,
cordappPackages,
"200m",
"512m",
*extraCmdLineFlag
)

View File

@ -54,7 +54,7 @@ task buildExplorerJAR(type: FatCapsule, dependsOn: project(':tools:explorer').co
// - Switch to the G1 GC which is going to be the default in Java 9 and gives low pause times/string dedup.
//
// If you change these flags, please also update Driver.kt
jvmArgs = ['-Xmx200m', '-XX:+UseG1GC']
jvmArgs = ['-Xmx512m', '-XX:+UseG1GC']
}
}