ElasticSearch之虚拟内存

news/2024/7/7 5:50:35 标签: elasticsearch, linux

查看当前Linux系统中vm.max_map_count变量的值,命令如下:

sysctl vm.max_map_count

执行结果的样例,如下:

vm.max_map_count = 65530

修改参数vm.max_map_count的值,命令如下:

sysctl -w vm.max_map_count=262144

执行结果的样例,如下:

vm.max_map_count = 262144

为保证重启Linux系统后vm.max_map_count的取值依然生效,可以修改Linux系统配置文件/etc/sysctl.conf,追加如下内容:

vm.max_map_count=262144

配置文件/etc/sysctl.conf的内容,样例如下:

#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1


###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#

###################################################################
# Magic system request Key
# 0=disable, 1=enable all, >1 bitmask of sysrq functions
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
# for what other values do
#kernel.sysrq=438
vm.swappiness=20
vm.max_map_count=262144

已知Elasticsearch进程的pid19483,查看Elasticsearch进程当前占用的mmap的数量,命令样例如下:

wc -l /proc/19483/maps

执行结果的样例,如下:

414 /proc/19483/maps

相关资料

  • Virtual memory
  • Elasticsearch 内存占用分析及 page cache 监控
  • Elasticsearch
  • Linux修改文件句柄数及vm.max_map_count、stack size的大小
  • elasticsearch vm.max_map_count
  • Kafka之 vm.max_map_count
  • 大数据技术之Elasticsearch

http://www.niftyadmin.cn/n/5212291.html

相关文章

Java实现求最大值

1 问题 接收用户输入的3个整数,如何将最大值作为结果输出。 2 方法 采用“截图文字代码”的方式描述。 引入输入包调用main()函数,提示并接收用户输入的3个整数,并交由变量a b c来保存。对接收的3个数据进行比较,先比较a和b&#…

ubuntu环境删除qtcreator方法

文章目录 方法1方法2方法3参考不同的安装方法,对应不同的删除方法 方法1 apt-get或者dpkg 方法2 QtCreatorUninstaller 方法3 MaintenanceTool

服务器被入侵了怎么去排查

在当今数字化时代,网络安全问题变得越来越重要。其中,服务器被入侵是一种常见的安全威胁。当服务器被入侵时,我们需要采取一系列措施来排查和解决问题。本文将为您提供服务器被入侵后的排查步骤。 第一步:确认服务器被入侵 当发现…

【cppcheck 静态代码分析工具使用教程】

cppcheck 是一个流行的静态代码分析工具,用于 C 和 C++ 程序。它可以帮助检测代码中的错误、未定义的行为、内存泄漏等。在 Ubuntu 系统上使用 cppcheck 的基本步骤和示例如下: 文章目录 安装 `cppcheck`使用 `cppcheck`基本用法选项示例集成到 IDE注意事项安装 cppcheck 打开…

Vue 或者 React 中,什么情况下会用 Es6 的 Class类

// 问个问题,一般在 Vue 或者 React中 // 在框架具备很多组件通讯技术或者js语法支持的情况下,什么情况下会用 Es6 的 Class类?在Vue或React中,通常会在以下情况下使用ES6的Class类: 复杂组件或模块: 当需要构建较为复…

0003Java程序设计-ssm基于微信小程序的家教信息管理系统

文章目录 摘要目 录系统实现开发环境 编程技术交流、源码分享、模板分享、网课分享 企鹅🐧裙:776871563 摘要 本文讲述了基于微信小程序的家教信息管理系统的设计与实现。结合线上管理的特点,分析了家教信息管理系统的现状,给出…

Pix2Pix 使用指南:从原理到项目应用

Pix2Pix Pix2Pix 介绍:使用条件 GAN 进行图像到图像的转换Pix2Pix 原理Pix2Pix 模型结构生成器:Unet结构判别器:PatchGAN目标函数目标函数总结 Pix2Pix 项目使用 Pix2Pix 介绍:使用条件 GAN 进行图像到图像的转换 Pix2Pix 论文&a…

电源控制系统架构(PCSA)之系统控制处理器(SCP)协调

目录 5.3 系统控制处理器(SCP)的协调 5.3.1 SOC电源状态 5.3.2 Cluster电源状态 5.3 系统控制处理器(SCP)的协调 并非所有的电源状态请求都将被显式处理。除了HW自主选择电源模式外,SCP固件还可以在电源模式选择过…