请问一下怎么查看nebula 的当前客户端连接数?
当前对应nebula 1.x版本的客户端没有提供这个接口支持,新的客户端(对应nebula2.0)的正在开发中。
如果要在1.0 客户端统计连接数,这个需要你在外层自行封装了。
顺带问一下, 目前遇到一种情况:我使用Python的客户端连接, 然后依次启动多个程序, 每个程序中都设置了200连接数,然后前几个程序可以正常启动,后面的程序卡在初始化连接的阶段。请问一下是不是有连接数的限制?
以下是一些参数的配置
[root@nebula-server-3 ~]# sysctl -a | grep net.core.somaxconn
net.core.somaxconn = 1024
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.docker0.stable_secret"
sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
graph 配置
# Network device to listen on
--listen_netdev=any
# Port to listen on
--port=3699
# To turn on SO_REUSEPORT or not
--reuse_port=false
# Backlog of the listen socket, adjust this together with net.core.somaxconn
--listen_backlog=1024
# Seconds before the idle connections are closed, 0 for never closed
--client_idle_timeout_secs=0
# Seconds before the idle sessions are expired, 0 for no expiration
--session_idle_timeout_secs=0
# The number of threads to accept incoming connections
--num_accept_threads=1
# The number of networking IO threads, 0 for # of CPU cores
--num_netio_threads=0
# The number of threads to execute user queries, 0 for # of CPU cores
--num_worker_threads=0
# HTTP service ip
卡住现象如下图 按理应该初始化200个连接,然后目前只初始化几个后就不继续初始化了
我们是在服务器端用 netstat 查的 netstat -an | grep ESTABLISHED | grep :3699 | wc -l
graphd的这个配置
–listen_backlog
还有系统 net.core.somaxconn 这个配置统一改大点
感谢,可以再问一个问题,文档上这个参数rocksdb_block_cache建议设置为本机内存的1/3,假设我有一台32g内存的机子,可以设置为10g吧?
谢谢分享,我这边尝试一下
可以,完全没问题。我们现在就是这样设置的。