Comments (6)
I answered further on the PR, probably best to keep having the conversation in one place instead of two
from frigate.
There is a lot of documentation on how to improve nginx performance, this is part of the recommended config and we specifically added the config a couple versions ago when focusing on nginx / hls performance https://www.cloudbees.com/blog/tuning-nginx#worker-threads
from frigate.
also to be clear, for your specific needs you can just bind mount an edited nginx config to change it in your container
from frigate.
also to be clear, for your specific needs you can just bind mount an edited nginx config to change it in your container
This is not an edge case, I would imagine a majority of deployments of Frigate will be in containerised environments. Each worker process can handle 1024 connections - which is plenty for any self hosted application. Surely the conservative approach is to ask enterprise users which need performance tuning to mount custom NGINX configurations and not the majority of users?
As asked in the associated PR, how would you propose this be fixed? It is actually detrimental to performance to have 128 NGINX worker processes when there is only a single CPU thread available because of cgroups.
from frigate.
I am not referring to containerized environments. I am referring to using large scale enterprise CPUs but only passing in a single CPU core so there is an inbalance.
For now you can fix it for yourself as I already said. Long term we may make the nginx config dynamically defined instead of statically defined at which point it would be easier to configure without using docker bind mounts
from frigate.
This is not a problem just for enterprise CPUs either. There are plenty of consumer CPUs with 24, 32 and even 64 threads available. It's good practice to assign CPU/memory limits to containers to have a stable QoS and prevent global resource contention.
I feel like I've been reasonable in asking if you agree that a worker process for each thread is overkill, what alternative suggestions you may have and some benchmarks or context for the change to the number of worker processes? Single threaded performance is far better than it was years ago and I don't believe the blanket advice of one worker per thread is reasonable or best practice these days. As mentioned before NGINX is very well optimised and can easily server tens of thousands of requests per second on a single core without a sweat. I don't see any reason to use more than a single worker process for any deployment other than a huge enterprise, in which case they should be the ones doing special configuration and performance tuning...
from frigate.
Related Issues (20)
- Feature Req: Historic Motion Box Event Scanning (Willing to Pay) HOT 1
- FFMPEG is crashing the intel NUC due to memory stranded at 100% HOT 1
- Option to only run recording ffmpeg process during an event HOT 3
- Reduce the video player format HOT 1
- partition the snapshots into cameras and dates
- Possibility to trigger a recording via an external call (maybe REST?) HOT 1
- can /tmp/cache and /dev/shm use same mount? HOT 1
- Adopt system stats to specific platforms HOT 3
- Configure initial detect/record/snaphsot/audio states, or keep them across restarts HOT 1
- Storage Overview Breakout: Recordings vs Events vs Snapshots vs Saved HOT 1
- Start Frigate even with an invalid config to make editing the config less painful HOT 1
- [Detector Support]: rpi5+haos+coral m.2 not detected HOT 3
- [UI] Ability to zoom the timeline HOT 24
- [UI] Screen to solve the goal "why was this review item created"
- Allow recording multiple streams per camera HOT 1
- Support other backend databases (Postgres?) HOT 3
- Add external events to Frigate Event Log via MQTT or HTTP HOT 2
- Use the DeepStack interface to use yolo-models HOT 2
- [UI/nit] Logs, "Jump to Bottom" button colors HOT 3
- ValueError: month must be in 1..12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frigate.