Comments (3)
The fount always returns the number of pids asked for or none. The caller never needs to do a length on the result, and it is expected that there is a reason for the exact number requested, not a maximum. Also, in overload situations, rather than running at absolute maximum all the time, it fluctuates a bit allowing the number of active processes to float down so that others can make more progress.
from epocxy.
On thinking about it, there is an issue with having 2 slabs. If you use up one slab, there will often be a partial 2nd slab. So if you ask for close to 2 slabs worth of pids, it will never fill up until you use the partial slab completely without asking for more.
There's not much that can be done about this case, it is a mechanical sympathy problem. If you are asking for 7 pids, the reservoir should have more than 2 slabs of 4 to be responsive. The reservoir depth should allow for spikes that go beyond normal, so I would use a depth of 4 or 5, or use a slab size that is bigger relative to the number of pids normally requested.
As a rough guide: 1) typical (or even maximum) number of pids should be less than one slab, or just slightly more; or 2) use at least 3 slabs. It's a configuration tuning issue.
from epocxy.
Solved by #76 (not really solved, but not considered an open issue any more). This PR requires 3 slabs in all founts. Best practice is to not ask for more than 2 slabs worth in a single request. If you need more pids, break it into multiple requests or increase the depth or slab size of the fount.
from epocxy.
Related Issues (20)
- Do controlled shutdown when cxy_ctl:remove_task_types is called
- Add cxy_ctl_sup to properly own ets tables
- Add deferred option for cxy_ctl
- Calling cxy_cache_sup:start_cache/3 succeeds with bad param
- Add API for querying the age of an ets_buffer
- Generational caching should be generalized as a behaviour
- Concurrent 1 writer and 1 reader causes ets_buffer:read return {missing_ets_data, buffer_name, N} HOT 1
- Add "process geyser" pattern HOT 3
- ets_buffer:create overwrites metadata without warning
- Concurrency bug? HOT 1
- Concurrency bug? HOT 2
- Race condition in cxy_cache:create_new_value HOT 1
- No correct way to invalidate cache entries HOT 1
- Make tests fails : Test run failed! Reason: {'EXIT',{error,{enoent,"src/"}}} HOT 9
- make edoc fails HOT 1
- question about `make_sup_name` in cxy_foun_sup HOT 1
- cxy_fount behaviour requires init/1 but is called as init/* HOT 2
- Suggestion : Add ability to flush data based on LRU HOT 1
- ring buffer bug HOT 2
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 epocxy.