Default amount of memory allocated for Windows Docker containers? - docker-for-windows

What is the default amount of memory that's assigned to Docker for Windows containers?

By default Docker for Windows containers get:
when using Hyper-V isolation (ie. on Windows 10), 1GB of memory
when using process isolation, unlimited (same as host) memory
The details are documented here:
https://github.com/moby/moby/pull/32724/files#diff-505c72218d90da970c16fdbf0b4f613c
When using docker-compose this means that you need to explicitly set the memory limit, e.g.
services:
mssql:
image: microsoft/mssql-server-windows-express
mem_limit: 4096m
to have 4GB of memory available.

Related

Apache Tomcat Crashes In Google Compute Engine f1-micro

I am running Apache Guacamole on a Google Cloud Compute Engine f1-micro with CentOS 7 because it is free.
Guacamole runs fine for some time (an hour or so) then unexpectantly crashes. I get the ERR_CONNECTION_REFUSED error in Chrome and when running htop I can see that all of the tomcat processes have stopped. To get it running again I just have to restart tomcat.
I have a message saying "Instance "guac" is overutilized. Consider switching to the machine type: g1-small (1 vCPU, 1.7 GB memory)" in the compute engine console.
I have tried limiting the memory allocation to tomcat, but that didn't seem to work.
Any suggestions?
I think the reason for the ERR_CONNECTION_REFUSED is likely due to the VM instance falling short on resources and in order to keep the OS up, process manager shuts down some processes. SSH is one of those processes, and once you reboot the vm, resource will resume operation in full.
As per the "over-utilization" notification recommending g1-small (1 vCPU, 1.7 GB memory)", please note that, f1-micro is a shared-core micro machine type with 0.2 vCPU, 0.60 GB of memory, backed by a shared physical core and is only ideal for running smaller non-resource intensive applications..
Depending on your Tomcat configuration, also note that:
Connecting to a database is an intensive process.
Creating a Tomcat with Google Marketplace, the default VM setting is "VM instance: 1 vCPU + 3.75 GB memory (n1-standard-1) so upgrading to machine type: g1-small (1 vCPU, 1.7 GB memory) so should ideal in your case.
Why was g1 small machine type recommended. Please note that Compute Engine uses the same CPU utilization numbers reported on the Compute Engine dashboard to determine what recommendations to make. These numbers are based on the average utilization of your instances over 60-seconds intervals, so they do not capture short CPU usage spikes.
So, applications with short usage spikes might need to run on a larger machine type than the one recommended by Google, to accommodate these spikes"
In summary my suggestion would be to upgrade as recommended. Also note that, the rightsizing gives warnings when VM is underutilized or overutilized and in this case, it is recommending to increase your VM size due to overutilization and keep in mind that this is only a recommendation based on the available data.

How to get complete memory usage statistics

My spark application is running on remote machine in our internal lab. To analyse the memory consumption of remote application, attached the remote application pid to JProfiler by using the 'attach mode' (with help of jpenable) from my local machine.
After attaching the remote application to JProfiler in local machine, the JProfiler showing only 5% of memory consumption of the remote machine but when we ran the 'top' command on remote Centos machine, the 'top' command showing the 72% of memory consumption. And I am unable to find the whole 72% consumption with JProfiler application.
Please help me to get the whole memory consumption (i.e., 72% of memory usage) statistics by using the JProfiler application.
top shows memory reserved by the JVM, not the actually used heap, so you cannot compare the two values.
In addition, the JVM uses native memory that does not show up in the heap. A Java profiler cannot analyze that memory.

Docker-Selenium Maximum number of chrome containers

I'm setting up a test infrastructure using Azure & Docker - Selenium HUB and Chrome Images
Running the latest version of Ubuntu on AZURE
System Configuration
Ubuntu:16*
Docker: Latest Version
RAM: 6GB
SSD: 120GB
Able to run automation script in the Chrome containers without any issue, if the number of containers is <=10.
When I scale up the numbers, entire system freezes and not responding and the tests are not running.
PS: I'm also mounting /dev/shm:/dev/shm when creating the containers.
What should be the optimal system configuration to run a minimum of 75 containers?
6GB RAM for 75 containers means ~ 80 MB/container. That too you want to run a firefox/chrome inside? Which may be running headless/without display but that doesn't mean they are not memory hungry.
You would need to park 500MB memory/container for such nodes. You can set a memory limit but as soon as your container goes above it, poof!!!. The container is dead and so is your browser and your test. Best is to either use Docker Swarm to deploy a self healing Selenium Grid
Or you can use https://github.com/zalando/zalenium as mentioned by #Leo Galluci.
PS: I wrote an article on how to setup Grid on swarm http://tarunlalwani.com/post/deploy-selenium-grid-using-docker-swarm-aws/. You can have a look at the same to get an idea at the horizontal scaling your grid

Minimum RAM that Weblogic Admin Console can run under

What is the minimum amount of RAM that the Weblogic Admin Consoel (version 10.3.2) will run under?
256MB is usually a safe bet but for our larger production domains, we use as much as 512mb. In addition to the domain size, your WLDF settings can affect the required heap size.
On a test system, you can probably get away with 128mb.
4 GB
Setting the memory arguments for the WebLogic application servers for SASĀ® Financial Management

VMWare Player - swapping to disk more if more memory allocated

Windows XP as base OS. Laptop has 4GB RAM and 2*2.2GHz cores. About 3 year old laptop
Am using Windows7 in VMWare Player. If I allocate more than 1GB of RAM to the Win7 machine in the VMWare player settings it goes so slow, and is continually swapping to disk.
I've turned off all Win7 processor intensive stuff.
http://www.computingunleashed.com/speed-up-windows-7-ultimate-guide-to.html
http://www.computingunleashed.com/list-of-services-in-windows-7-that-can.html
The base OS only reports using aboiut 144MB of RAM to the player. Very weird.
I'm using 2 virtual disks: 20GB SCSI for c:\ and 25GB SCSI for data f:\
Problem: How to tweak Win7 VMware (ie VS2010, Sql2008R2) well on an older laptop. Or use something else?
The problem is that by default vmware player uses file as memory.
Read this for more info & fix
http://communities.vmware.com/thread/46122
If you want to achieve this for all your VMs, you may just add/append following two lines:
prefvmx.minVmMemPct = 100
mainMem.useNamedFile = "false"
... inside the following VMware-wide configuration file:
C:/ProgramData/VMware/VMware Workstation/config.ini (or sometimes settings.ini)
The first line sets the percentage of configured VM memory that should fit into the host memory and the second (as already shown in the prior answer) disables default file-based memory usage.
If you want to apply this to a specific VM only, in order to not alter general VMware configuration, adding the following line to the VM's *.vmx file may be an alternative:
hard-disk.hostBuffer = "disabled"