apache/incubator-flink — pull request #14 by uce (2014-06-12 19:19:46+00:00)
Title: [FLINK-934] Remove default values for JVM heap sizes in startup scripts

This is a fix for [FLINK-934](https://issues.apache.org/jira/browse/FLINK-934). As a follow up we should have the heap config keys only as suggested entries (commented out) in [FLINK-898](https://issues.apache.org/jira/browse/FLINK-898) aka #6.

With `jobmanager.heap.mb` and `taskmanager.heap.mb` not set, 16 GB of main memory and Java 7.

```bash
$ ./bin/start-local.sh
Starting job manager
$ jps
9601 JobManager
$ jinfo -flag MaxHeapSize 9601
-XX:MaxHeapSize=4294967296
```

JobManager with 4294967296/2^20 = 4096 MB heap size.

---

```bash
$ bin/start-cluster.sh
Starting job manager
Starting task manager on host batman
$ jps
10049 TaskManager
9966 JobManager
$ jinfo -flag MaxHeapSize 9966
-XX:MaxHeapSize=4294967296
$jinfo -flag MaxHeapSize 10049
-XX:MaxHeapSize=4294967296
```
Both JobManager and TaskManager with 4294967296/2^20 = 4096 MB heap size each.

---

Setting `jobmanager.heap.mb` and `taskmanager.heap.mb` to 256 and 512 MB respectively.

```bash
$ bin/start-local.sh
Starting job manager
$ jps
10542 JobManager
$ jinfo -flag MaxHeapSize 10542
-XX:MaxHeapSize=805306368
```

JobManager with 805306368/2^20 = 768 MB (256 for the JobManager and 512 MB for the TaskManager).

---

```bash
$ bin/start-cluster.sh
Starting job manager
Starting task manager on host batman
$ jps
10833 JobManager
10918 TaskManager
$ jinfo -flag MaxHeapSize 10833
-XX:MaxHeapSize=268435456
$jinfo -flag MaxHeapSize 10918
-XX:MaxHeapSize=536870912
```
JobManager with 268435456/2^20 = 256 MB and TaskManager with 536870912/2^20 = 512 MB.