0

According to documentation I should be able to set -Xmx of an application with the deployer.time.memory property.

I created the following stream definition:

dataflow:>stream create --name ticktock --definition "time | log"

And I've tried deploying it on my Kubernetes CDF in several ways:

dataflow:>stream deploy --name ticktock --properties "deployer.time.memory=2048m"

dataflow:>stream deploy --name ticktock --properties "deployer.time.local.memory=2048m"

dataflow:>stream deploy --name ticktock --properties "deployer.time.local.javaOpts=2048m"

After each deployment I've run the following commands:

# ps aux | grep time | grep -i xmx
#

# docker ps
CONTAINER ID        IMAGE                                                COMMAND                  CREATED             STATUS              PORTS               NAMES
52a31b764112        springcloudstream/time-source-rabbit:1.2.0.RELEASE   "java -jar /maven/tim"   7 minutes ago       Up 7 minutes                            k8s_ticktock-time.a4ab30e_ticktock-time-kqckg_default_53b3e059-5049-11e7-a0d4-000c29df937a_3cc76216

Why isn't -Xmx set on the time app?

alturkovic
  • 990
  • 8
  • 31

1 Answers1

0

The properties you refer above are the local deployer properties, not the kubernetes deployer properties. For the Kubernetes deployment properties you can refer the documentation here: http://docs.spring.io/spring-cloud-dataflow-server-kubernetes/docs/current-SNAPSHOT/reference/htmlsingle/

Ilayaperumal Gopinathan
  • 4,099
  • 1
  • 13
  • 12
  • I thought so at first, but I can't find any chapter for setting -Xmx in it. Does that mean that it isn't possible to set it? – alturkovic Jun 14 '17 at 18:05
  • There are a few options to pass app properties. It is controlled by `spring.cloud.deployer.kubernetes.entryPointStyle` and it takes `exec`, `shell`, or `boot` as the options with the default being `exec`. If this is set as a global deployer property, the `deployer.time.memory` should take into account. Alternatively, if you're trying to override the memory for all the apps, you can use `spring.cloud.deployer.kubernetes.memory` as a global property, too. – Sabby Anandan Jun 16 '17 at 21:32
  • I have set the kubernetes memory limit to 2 GiB for all apps. I would like to set -Xmx from app to app because java in docker doesn't work really well without it. So I don't want to set it globally. `spring.cloud.deployer.kubernetes.entryPointStyle` is default, but you can see from my question that I've passed `deployer.time.memory` but there is no -Xmx passed to java process. – alturkovic Jun 17 '17 at 09:00
  • Apologies for the delay. There's an undocumented `spring.cloud.deployer.kubernetes.environmentVariables` property that can be used to override memory allocations instead of depending on the defaults. To this property, you can pass options, for example, `JAVA_OPTIONS=-Xmx2048m` as the value. We will document this via [spring-cloud/spring-cloud-dataflow-server-kubernetes#200](https://github.com/spring-cloud/spring-cloud-dataflow-server-kubernetes/issues/200) – Sabby Anandan Jul 03 '17 at 21:36