Comments (9)
This is a problem with FFmpeg, not a problem with my code. If you are calling destroy player, then all resources are freed. What's happening here is FFmpeg's very memory allocation heavy code and that the operating system isn't reclaiming the memory due to laziness.
Edit: grammar
from yasha.
I've done tests where I've launched several thousand players, killed them, and relaunched them, and the memory stays high but doesn't get higher, and after 10 minutes the memory usage stops growing.
from yasha.
Is there any workaround? Does using a different malloc help in this case?
from yasha.
I don't know if you can configure FFmpeg's malloc, I haven't gone through their source code that much, but the issue seems to be their libavformat library.
from yasha.
There are other forums that mention this "leak" and named possible causes like heap fragmentation, but I haven't bothered too much investigating.
from yasha.
I'd love to help with this but I don't have any experience with cpp yet.
A cron restart wouldn't hurt anyways. Thanks for the help.
from yasha.
I have a newer project coming out in about 1-2 months to replace this library and it doesn't have this issue. Can't give any promises on actual release date. Also uses 92% less cpu and 115KiB of memory per player on average. That's all I can promise as of now. Also, if you have more memory than it uses RSS, I think you'll be fine even without restarts.
from yasha.
Sounds really promising! Too good to be true actually 😅 since you've already did an amazing job on this and sange. Will be looking forward to try it though!
from yasha.
Hey, don't know if you're going to see this but the project has taken significantly longer than I anticipated.
I felt like I should inform you on the progress I've made since:
I think I might have some kind of prototype soon (<1 month away). I've already released most of the code that I've written so far in
and so far it covers all the basic needs of the final project
Though I am somewhat concerned about the safety of the code as I have not had time to check all my code logic.
If everything goes well, I should have something good before the end of the year :)
from yasha.
Related Issues (5)
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 yasha.