0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-12 04:51:08 +01:00

ircd::info: Remove the fixed-rlimit sample section here.

This commit is contained in:
Jason Volk 2020-03-20 09:33:49 -07:00
parent 291de1a49b
commit bc836d0fd8
3 changed files with 0 additions and 100 deletions

View file

@ -53,14 +53,6 @@ namespace ircd::info
extern const size_t total_ram;
extern const size_t total_swap;
// Resource limitations
extern const size_t rlimit_as;
extern const size_t rlimit_data;
extern const size_t rlimit_rss;
extern const size_t rlimit_nofile;
extern const size_t rlimit_rttime;
extern const size_t rlimit_memlock;
// Host & third-party information
#ifdef HAVE_SYS_UTSNAME_H
extern const ::utsname utsname;

View file

@ -337,14 +337,6 @@ ircd::fs::support::dump_info()
const bool support_async {false};
#endif
if(info::rlimit_nofile <= 1024)
log::warning
{
log, "Maximum number of open files limited to %zu."
" Suggest increasing for best performance.",
info::rlimit_nofile,
};
log::info
{
log, "Support: async:%b preadv2:%b pwritev2:%b SYNC:%b DSYNC:%b HIPRI:%b NOWAIT:%b APPEND:%b RWH:%b WLH:%b",

View file

@ -11,7 +11,6 @@
#include <RB_INC_UNISTD_H
#include <RB_INC_CPUID_H
#include <RB_INC_SYS_SYSINFO_H
#include <RB_INC_SYS_RESOURCE_H
#include <RB_INC_GNU_LIBC_VERSION_H
namespace ircd::info
@ -417,21 +416,6 @@ ircd::info::dump_sys_info()
// Dump detected filesystem related to log.
fs::support::dump_info();
// This message flashes posix information about the resource limits
#ifdef RB_DEBUG
log::logf
{
log::star, log::DEBUG,
"rlimit AS=%lu DATA=%lu RSS=%lu NOFILE=%lu RTTIME=%lu MEMLOCK=%lu",
rlimit_as,
rlimit_data,
rlimit_rss,
rlimit_nofile,
rlimit_rttime,
rlimit_memlock,
};
#endif
// Additional detected system parameters
#ifdef RB_DEBUG
char buf[2][48];
@ -512,74 +496,6 @@ ircd::info::kernel_version
}
};
//
// Resource limits
//
#ifdef HAVE_SYS_RESOURCE_H
static uint64_t
_get_rlimit(const int &resource)
{
rlimit rlim;
ircd::syscall(getrlimit, resource, &rlim);
return rlim.rlim_cur;
}
#else
static uint64_t
_get_rlimit(const int &resource)
{
return 0;
}
#endif
decltype(ircd::info::rlimit_memlock)
ircd::info::rlimit_memlock
{
#ifdef RLIMIT_MEMLOCK
_get_rlimit(RLIMIT_MEMLOCK)
#endif
};
decltype(ircd::info::rlimit_rttime)
ircd::info::rlimit_rttime
{
#ifdef RLIMIT_RTTIME
_get_rlimit(RLIMIT_RTTIME)
#endif
};
decltype(ircd::info::rlimit_nofile)
ircd::info::rlimit_nofile
{
#ifdef RLIMIT_NOFILE
_get_rlimit(RLIMIT_NOFILE)
#endif
};
decltype(ircd::info::rlimit_rss)
ircd::info::rlimit_rss
{
#ifdef RLIMIT_RSS
_get_rlimit(RLIMIT_RSS)
#endif
};
decltype(ircd::info::rlimit_data)
ircd::info::rlimit_data
{
#ifdef RLIMIT_DATA
_get_rlimit(RLIMIT_DATA)
#endif
};
decltype(ircd::info::rlimit_as)
ircd::info::rlimit_as
{
#ifdef RLIMIT_AS
_get_rlimit(RLIMIT_AS)
#endif
};
//
// System configuration
//