xref: /Lucene/help/localSettings.txt (revision ba1062620c5e41099792996d3b78095884c382f2)
1Local developer settings
2========================
3
4The first invocation of any task in Lucene's gradle build will generate
5and save a project-local 'gradle.properties' file. This file contains
6the defaults you may (but don't have to) tweak for your particular hardware
7(or taste). Note there are certain settings in that file that may
8be _required_ at runtime for certain plugins (an example is the spotless/
9google java format plugin, which requires adding custom exports to JVM modules). Gradle
10build only generates this file if it's not already present (it never overwrites
11the defaults) -- occasionally you may have to manually delete (or move) this
12file and regenerate from scratch.
13
14This is an overview of some settings present in gradle.properties.
15
16Parallelism
17-----------
18
19Gradle build can run tasks in parallel but by default it consumes all CPU cores which
20is too optimistic a default for Lucene tests. You can disable the parallelism
21entirely or assign it a 'low' priority with these properties:
22
23org.gradle.parallel=[true, false]
24org.gradle.priority=[normal, low]
25
26The default level of parallelism is computed based on the number of cores on
27your machine (on the first run of gradle build). By default these are fairly conservative
28settings (half the number of cores for workers, for example):
29
30org.gradle.workers.max=[X]
31tests.jvms=[N <= X]
32
33The number of test JVMs can be lower than the number of workers: this just means
34that two projects can run tests in parallel to saturate all the workers. The I/O and memory
35bandwidth limits will kick in quickly so even if you have a very beefy machine bumping
36it too high may not help.
37
38You can always override these settings locally using command line as well:
39gradlew -Ptests.jvms=N --max-workers=X
40
41Test JVMS
42---------
43
44Test JVMs have their own set of arguments which can be customized. These are configured
45separately from the gradle workers, for example:
46
47tests.jvms=3
48tests.heapsize=512m
49tests.minheapsize=512m
50tests.jvmargs=-XX:+UseParallelGC -XX:TieredStopAtLevel=1
51
52Gradle Daemon
53-------------
54
55The gradle daemon is a background process that keeps an evaluated copy of the project
56structure, some caches, etc. It speeds up repeated builds quite a bit but if you don't
57like the idea of having a (sizeable) background process running in the background,
58disable it.
59
60org.gradle.daemon=[true, false]
61org.gradle.jvmargs=...
62
63