DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Memory Usage of OpenWhisk Functions

If you've heard about Red Hat's Quarkus, you'll want to see the results of this memory experiment.

Niklas Heidloff user avatar by
Niklas Heidloff
CORE ·
Mar. 29, 19 · Tutorial
Like (2)
Save
Tweet
Share
5.01K Views

Join the DZone community and get the full member experience.

Join For Free

last week red hat introduced the open source framework quarkus which promises fast boot times and low memory usages. this makes quarkus interesting for java workloads running as serverless functions.

i've done a little experiment to compare how much memory functions require which run on apache openwhisk and have been implemented with java and javascript.

note: this is just a quick experiment. i haven't measured the actual memory in the cloud, i haven't created much load, the functions don't really do anything, etc.

i compare four different types of functions:

  • javascript functions as openwhisk provides them out of the box
  • java functions as openwhisk provides them out of the box
  • java functions using quarkus
  • javascript functions using the node:8-alpine image

i've open sourced the code and the scripts. get the code.

you can run the functions in the cloud on ibm cloud functions and measure the time it takes to execute them. in my quick tests, all of them took roughly the same amount of time once the containers were warm. also the functions only implement echo functionality, which is why it doesn't make much sense to measure the execution times of these functions.

that's why i focussed on memory usage. since i'm not aware of any way to measure the memory on ibm cloud functions, i've set up openwhisk locally . i hadn't done this before, but it was really easy and didn't take longer than 10 minutes. this allows you to run the same containers locally that are run in the cloud.

in order to run the tests yourself, follow the steps in the readme . you need to install some prerequisites and build the images. after this you can create the four functions via some scripts i've provided. i create the functions with a memory limit of 128 mb which is the smallest possible configuration .

in order to see the memory usage, i've used the 'docker stats' command. here are the results:

Memory (storage engine)

Published at DZone with permission of Niklas Heidloff, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • OpenID Connect Flows
  • 2023 Software Testing Trends: A Look Ahead at the Industry's Future
  • Understanding gRPC Concepts, Use Cases, and Best Practices
  • Kotlin Is More Fun Than Java And This Is a Big Deal

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: