You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/03/01 11:29:30 UTC
[GitHub] Param-S commented on issue #7: Use Class Data Sharing for Java actions
Param-S commented on issue #7: Use Class Data Sharing for Java actions
URL: https://github.com/apache/incubator-openwhisk-runtime-java/issues/7#issuecomment-369563296
Effect of CDS on startup and memory.
Startup time measure by capturing timestamp before invoking the Java command & after server started up. Like
**in Dockerfile:**
```
///CMD ["java", "-jar", "/javaAction/build/libs/javaAction-all.jar"]
CMD ["/bin/bash", "/javaAction/run.sh"]
```
**in run.sh:**
```
date +%H:%M:%S:%N-%Z /* capture the time before invoking java command */
java -jar /javaAction/build/libs/javaAction-all.jar
```
**in Proxy.java:**
```
public void start() {
server.start();
**/* capture the time after the Http server start */**
ZoneId zoneId = ZoneId.of("UTC");
ZonedDateTime ctime = ZonedDateTime.now(zoneId);
System.out.println(ctime.toString());
}
```
With this change, I measured the startup time for 50 iterations & server startup faster.
<img width="563" alt="screen shot 2018-03-01 at 4 38 06 pm" src="https://user-images.githubusercontent.com/13217743/36842278-3576e85c-1d71-11e8-8288-e75a3c3d33f0.png">
Memory Usage:
```
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
388eea3db27f Xshare 0.11% 17.95MiB / 15.67GiB 0.11% 648B / 0B 0B / 4.1kB 23
16482b3afcc5 Default 0.13% 19.56MiB / 15.67GiB 0.12% 648B / 0B 0B / 4.1kB 23
```
Opened PR #21 to enable CDS.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services