Comments (6)
Seems that this is how thread pool is expected to work. It's more appropriate to use std::thread in agatedb, as we need long running threads instead of spawning short-running tasks.
from agatedb.
Can you explain more about "how thread pool is expected to work"? AgateDB should allow sharing global thread pool with other system.
from agatedb.
From yatp source code, it by default spawns a maximum of num_cpu
threads. https://github.com/tikv/yatp/blob/master/src/pool/builder.rs#L37 Therefore, (from my understanding, if threads in thread pool won't be preempted), there would have at most num_cpu
concurrently running threads in the background.
In agatedb with default configuration, we would have at least 5 concurrent tasks running in the background. If other systems have their thread pool misconfigured (like using num_cpus
as maximum thread, for GitHub Action, it should be 2), then the database would easily go into stall state (e.g. compaction is never run).
from agatedb.
How about setting a larger capacity?
from agatedb.
How about setting a larger capacity?
If we have 5 threads, and the thread pool always has these 5 threads running, there seems no difference with std::thread
:(
Anyway, I have put all threads back into yatp, and set max_threads
for the pool. adf14f7
from agatedb.
Setting a larger capacity is to get around the CI issues. In fact, the thread pool should not be created by the library, it should be a builder parameter given by users. It is critical in resource limited environment to have more precise control on threads.
from agatedb.
Related Issues (20)
- Feature Request: separate filter&index blocks and data blocks into two dedicated files, and SST supports range filter
- Feature Request: Adaptive Radix Tree memtable
- Running tests with code coverage is endless after switch compaction on
- Feature Request: cache system with precious memory usage limitation HOT 3
- Segmentation violation on leak sanitizer test
- Feature Reqeust: shard LRU list
- Feature Request: get key only
- Feature Request: async IO (io_uring on cloud block storage)
- 能给一些入门使用的例子吗 HOT 4
- create_if_not_exists 参数感觉可以删除掉,目前代码中并没有相关的判断,目录总是创建的。 HOT 3
- agatedb 中 的 yatp 是否可以拿出来放到AgateOptions中 HOT 5
- 一个我搞不定的错误 No such file or directory (os error 2) HOT 4
- 为什么db.update中set的key-value不生效? HOT 1
- Transaction 的 set(key,value) 不会增加版本号,当前进程读取是新数据,关闭进程后重新读取就会读取旧数据 HOT 3
- Read lock on LevelHandler while get HOT 4
- Proposal: Ingest External SST HOT 8
- [Question] Is this still being developed? HOT 1
- Compile error: no method named `steal_batch_with_limit_and_pop` found for struct `Injector` in the current scope
- The skiplist is not concurrent but could be used concurrently HOT 1
- Stale README
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 agatedb.