MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.31k stars 21.48k forks source link

Cosmos emulator "can run with as little as 0.5 cores" inaccurate/outdated #96583

Closed bigteejay closed 2 years ago

bigteejay commented 2 years ago

In Configuration Options in the docs, under --cpus it states...

"...the emulator can run with as little as 0.5 cores..."

This is not the case. It typically hovers around 100%-400%

compose.yaml ``` volumes: # mounting to local path caused cosmos emulator to kernel panic cosmosdb-data: name: cosmosdb-data cosmosdb: image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest container_name: cosmosdb # cpus: 4.0 # has no positive effect on issue environment: # Reduce resource burden AZURE_COSMOS_EMULATOR_PARTITION_COUNT: 1 AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE: 'true' ports: - 8081:8081 # data explorer ui volumes: - cosmosdb-data:/tmp/cosmos/appdata:rw ```
.wslconfig ``` [wsl2] memory=12GB processors=6 ``` RAM = 32GB CPU = 8cores

All 8 host cores are essentially unused (barely reach a quarter use). However, top command in resulting container shows (well) above 100% CPU. System is unusable and results in timeouts from the node.js SDK (which points to CPU/resource exhaustion, via docs)

Tried ensuring WSL was configured as per other issues/reports, to no avail. top in container shows cosmos emulator (alone) being the problematic process.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

AnuragSharma-MSFT commented 2 years ago

@bigteejay Thank you for the feedback. This is being assigned to the content author to evaluate and update as appropriate.

seesharprun commented 2 years ago

assign:seesharprun

Hello @bigteejay!

I agree that the recommendation should now be to use 2 cores. I have updated the doc to not mention 0.5 cores anymore and outright recommend 2 cores. The code samples were already updated to reflect this.

For the high CPU usage, you should file an issue with product feedback. This repo is for docs and we won't be able to provide technical support on the product itself.

This issue will auto-close once the change is in our publishing pipeline. You should see it soon.