Comments (8)
Moved to a different Project.
from readyset.
@Gautam Gopinadhan
from readyset.
Awesome! All that sounds great. π
from readyset.
@imeyer yes, that was the approach I was going to take at startup
Makes sense about providing precise guidance being tricky. Right now the signature we see is "I/O Error: Too many open files", which happens hours into readyset being up. So even a slightly more error sooner (e.g. "System misconfiguration detected: ulimit -n is set too low $current_value. ReadySet may need up to $recommended_value file descriptors.") and letting operators figure out how to fix the error themselves would probably prevent most of the pain in this case.
from readyset.
Was your plan to run a ulimit -Hn && ulimit -Sn
from within readyset itself? I think the most/closest would be to get the runinng PID of readyset immediately at startup (in the readyset Rust code), and parse the /proc/<pid>/limits
file for that information, and that would cover pretty much all cases I mentioned. (i'm sure there is an idiomatic rust way, I just don't know it π)
The tricky part is informing the user how to set it appropriately based on how they're running readyset as limits across distros etc are not uniform. For example the defaults for the following distrosβ¦
Amazon Linux 2: sysctl fs.file-max && ulimit -Hn && ulimit -Sn
fs.file-max = 9223372036854775807
32768
32768
Ubuntu 22.04: sysctl fs.file-max && ulimit -Hn && ulimit -Sn
fs.file-max = 9223372036854775807
1048576
1024
Fedora 38: sysctl fs.file-max && ulimit -Hn && ulimit -Sn
fs.file-max = 9223372036854775807
524288
1024
Are quite different!
from readyset.
@imeyer From my reading, for 1,2,and 4 we should still be able to detect if readyset won't have enough file descriptors by running ulimit -n
on startup, but I'm not sure about (3). Do you have a recommendation for how to detect the file descriptor configuration in that use case?
from readyset.
Some things to consider for limits precedence (at least on Linux, unclear on the BSDs)
- sysctl is the facility for kernel tunables (
fs.file-max
takes precedence over values set via limits.conf(5)) - PAM controls user/group level limits and can not exceed those defined by the kernel
- There are hard and soft limits.
ulimit -Hn
andulimit -Sn
respectively - Limitations set via PAM are per process (i.e. you run readyset from your logged-in terminal), they are not global to a user/group/session.
- There are hard and soft limits.
- systemd has it's own mechanism for setting limits via
LimitNOFILE=<int>
in the[Service]
section of the unit file. - can be set before the process is started without changing anything in limits.conf(5) provided it does not exceed the hard limit.. (e.g.
ulimit -n 32768 && readyset β¦
)
from readyset.
Lets avoid getting fancy and just request for ulimit to be set to a large number (32K), if and its not set, we will fail to start up.
cc: @emrysal - we should set the ulimit in the docker scripts if this is not already happening.
cc: @coredb-service-userstanton - Similar setting may be needed in the helm installer as well.
from readyset.
Related Issues (20)
- selects with subquery doesn't show any fields when cached
- Invalid cache results with subselects
- cache failure with inherited tables
- Replication fails on timestamps with BC years
- BC timestamps appear incorrect in postgres
- Builtin functions have two column entries in graphviz
- Column name for builtin functions does not match upstream
- Add support for MySQL mediumint HOT 1
- Do not include `NULL` values in unbounded ranges
- Support `DISTINCT` post-lookup aggregates
- Allow users connect with a database set
- More than one prepared statement in a transaction fails in PHP PDO
- MySQL Enum Search is not respecting collation
- Add MySQL support to DDL vertical tests
- Prevent autoparameterization for selected literals
- Test behavior of DML and STATEMENT
- Add parsing capabilities for Index Hints HOT 1
- Run domains in a threadpool HOT 1
- Add support for MySQL TRUNCATE TABLE
- Update Replication Offset at shutdown
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 readyset.