Sunday, November 6, 2011

Micro Cloud Foundry – Increasing Default Memory Limits

I attended my first SpringOne a few weeks ago in my former hometown Chicago.  It was a very fun event with lots of energy around the Spring community as well as they Groovy and Grails crowd.  Cloud Foundry topics took center stage with many standing-room-only sessions and lots of people coming up to the booth.  All attendees received their very own copy of Micro Cloud Foundry as part of their conference paraphernalia on a USB stick inside the black binder.  Micro Cloud Foundry is a Virtual Machine that lets developers have a complete Cloud Foundry instance on their laptop.  This is great because you can develop locally and be confident that your application will run the same on cloudfoundry.com or another instance.  There are some great resources for getting started with Micro Cloud Foundry including Josh Long’s screencast and a Getting Started guide written by Charles Lee.  Micro Cloud Foundry defaults to a 1GB Virtual Machine, which limits the number of applications and the amount of memory per application to 1GB.  The Java and Spring application profiles default to 512MB, which is only 2 applications with the default settings.  I had a question from someone who walked up to the booth whether the memory limits could be increased.  Since Cloud Foundry guru Dave McCrory was close by I got a tip to simply boost the memory for the VM and  reconfigure using the console menu.  I tried it on my laptop since I’m lucky enough to have 8GB of RAM and it worked well.  Below are the steps.

Just need the punchline?

 

got micro #cloudfoundry to use up to 2GB of memory (1GB is default), stop mcf, change vm mem setting, start vm, menu option thanks @mccrory
Oct 26 via webFavoriteRetweetReply

 

The detailed steps

Micro Cloud Foundry has a text based interface, and if you select  “help” you can see the defaults.  There is also a Knowledge Base article describing resource limits on support.cloudfoundry.com.

Screen Shot 2011-11-06 at 9.30.02 AM

You can validate your Micro Cloud Foundry VM settings by using the vcap command line interface, here is where I start:

memoryToStart

So now you can stop your Micro Cloud Foundry VM, preferably through the text command interface so the VM shuts down properly.  Once the VM has been shutdown, you will be able to edit the memory settings by selecting Processors & RAM as shown below.  You cannot edit the memory settings while the VM is running.

Screen Shot 2011-11-06 at 9.57.44 AM

Now change the value from 1024 MB to 2048 MB.

Screen Shot 2011-11-06 at 9.58.22 AM

After restarting the VM with the larger memory settings, the Micro Cloud Foundry interface should detect that the memory settings need to be reconfigured and that should be shown with red text, so select that command.

Screen Shot 2011-11-06 at 9.58.53 AM

Follow the instructions in the console and when the services finish coming up again a few moments later, you can reissue the “vmc info” command and hopefully see the new higher memory limit in the response.

memoryToEnd

6 comments:

sugi said...

Thank you Jam..

- Sugi.

Unknown said...

Valentines Week

Unknown said...

keep it up man, this article is really very interesting and useful, thanks for sharing
https://happynewyeareve2019quotes.com/happy-new-year-images/

Teresa Halminton said...

Thank you! I look forward to seeing more news from you.
instagram technology

Judith Johnson said...

Such events are very useful for programmers and people who are interested in the field of technical sciences. It is a pity that such services as the best sociology essay writing service https://proessaywritings.com/sociology-essay.html (it is the essay writing service that has rewards as "The best sociology essay writing service" and as "The best sociology paper writing company") do not conduct such events that would be useful for humanitarians.

Shan said...

Awesome blog you have here but I was wondering if you knew of any message boards that cover the same topics discussed in this article?

I’d really like to be a part of group where I can get responses from other
experienced people that share the same interest.
If you have any recommendations, please let me know.
Cheers!

How to delete Amazon Account
How to Use Uber
Windows 98 product keys
How to uninstall Avast
How to cancel youtube red