MCPcopy Create free account
hub / github.com/questdb/questdb / verifyFileLimits

Method verifyFileLimits

core/src/main/java/io/questdb/Bootstrap.java:610–643  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

608 }
609
610 private void verifyFileLimits() {
611 boolean insufficientLimits = false;
612
613 final long fileLimit = Files.getFileLimit();
614 if (fileLimit < 0) {
615 log.error().$("could not read fs.file-max [errno=").$(Os.errno()).I$();
616 }
617 if (fileLimit > 0) {
618 if (fileLimit <= Files.DEFAULT_FILE_LIMIT) {
619 insufficientLimits = true;
620 log.advisoryW().$("fs.file-max limit is too low [limit=").$(fileLimit).$("] (SYSTEM COULD BE UNSTABLE)").$();
621 } else {
622 log.advisoryW().$("fs.file-max checked [limit=").$(fileLimit).I$();
623 }
624 }
625
626 final long mapCountLimit = Files.getMapCountLimit();
627 if (mapCountLimit < 0) {
628 log.error().$("could not read vm.max_map_count [errno=").$(Os.errno()).I$();
629 }
630 if (mapCountLimit > 0) {
631 if (mapCountLimit <= Files.DEFAULT_MAP_COUNT_LIMIT) {
632 insufficientLimits = true;
633 log.advisoryW().$("vm.max_map_count limit is too low [limit=").$(mapCountLimit).$("] (SYSTEM COULD BE UNSTABLE)").$();
634 } else {
635 log.advisoryW().$("vm.max_map_count checked [limit=").$(mapCountLimit).I$();
636 }
637 }
638
639 if (insufficientLimits) {
640 log.advisoryW().$("make sure to increase fs.file-max and vm.max_map_count limits:\n" +
641 "https://questdb.io/docs/deployment/capacity-planning/#os-configuration").$();
642 }
643 }
644
645 private void verifyFileSystem(Path path, CharSequence rootDir, String kind, boolean failOnNfs, boolean logUnstable) {
646 if (rootDir == null) {

Callers 1

BootstrapMethod · 0.95

Calls 7

getFileLimitMethod · 0.95
errnoMethod · 0.95
getMapCountLimitMethod · 0.95
I$Method · 0.80
$Method · 0.65
errorMethod · 0.65
advisoryWMethod · 0.65

Tested by

no test coverage detected