1. #!/bin/bash
  2. cat > sysctl.conf <<EOF
  3. # maximum number of open files/file descriptors
  4. fs.file-max = 4194303
  5. # use as little swap space as possible
  6. vm.swappiness = 1
  7. # prioritize application RAM against disk/swap cache
  8. vm.vfs_cache_pressure = 50
  9. # minimum free memory
  10. vm.min_free_kbytes = 1000000
  11. # follow mellanox best practices https://community.mellanox.com/s/article/linux-sysctl-tuning
  12. # the following changes are recommended for improving IPv4 traffic performance by Mellanox
  13. # disable the TCP timestamps option for better CPU utilization
  14. net.ipv4.tcp_timestamps = 0
  15. # enable the TCP selective acks option for better throughput
  16. net.ipv4.tcp_sack = 1
  17. # increase the maximum length of processor input queues
  18. net.core.netdev_max_backlog = 250000
  19. # increase the TCP maximum and default buffer sizes using setsockopt()
  20. net.core.rmem_max = 4194304
  21. net.core.wmem_max = 4194304
  22. net.core.rmem_default = 4194304
  23. net.core.wmem_default = 4194304
  24. net.core.optmem_max = 4194304
  25. # increase memory thresholds to prevent packet dropping:
  26. net.ipv4.tcp_rmem = 4096 87380 4194304
  27. net.ipv4.tcp_wmem = 4096 65536 4194304
  28. # enable low latency mode for TCP:
  29. net.ipv4.tcp_low_latency = 1
  30. # the following variable is used to tell the kernel how much of the socket buffer
  31. # space should be used for TCP window size, and how much to save for an application
  32. # buffer. A value of 1 means the socket buffer will be divided evenly between.
  33. # TCP windows size and application.
  34. net.ipv4.tcp_adv_win_scale = 1
  35. # maximum number of incoming connections
  36. net.core.somaxconn = 65535
  37. # maximum number of packets queued
  38. net.core.netdev_max_backlog = 10000
  39. # queue length of completely established sockets waiting for accept
  40. net.ipv4.tcp_max_syn_backlog = 4096
  41. # time to wait (seconds) for FIN packet
  42. net.ipv4.tcp_fin_timeout = 15
  43. # disable icmp send redirects
  44. net.ipv4.conf.all.send_redirects = 0
  45. # disable icmp accept redirect
  46. net.ipv4.conf.all.accept_redirects = 0
  47. # drop packets with LSR or SSR
  48. net.ipv4.conf.all.accept_source_route = 0
  49. # MTU discovery, only enable when ICMP blackhole detected
  50. net.ipv4.tcp_mtu_probing = 1
  51. EOF
  52. echo "Enabling system level tuning params"
  53. sysctl --quiet --load sysctl.conf && rm -f sysctl.conf
  54. # `Transparent Hugepage Support`*: This is a Linux kernel feature intended to improve
  55. # performance by making more efficient use of processor’s memory-mapping hardware.
  56. # But this may cause https://blogs.oracle.com/linux/performance-issues-with-transparent-huge-pages-thp
  57. # for non-optimized applications. As most Linux distributions set it to `enabled=always` by default,
  58. # we recommend changing this to `enabled=madvise`. This will allow applications optimized
  59. # for transparent hugepages to obtain the performance benefits, while preventing the
  60. # associated problems otherwise. Also, set `transparent_hugepage=madvise` on your kernel
  61. # command line (e.g. in /etc/default/grub) to persistently set this value.
  62. echo "Enabling THP madvise"
  63. echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/enabled

Linux服务器上MinIO生产部署的内核调优的更多相关文章

  1. .NET跨平台之旅:将QPS 100左右的ASP.NET Core站点部署到Linux服务器上

    今天下午我们将生产环境中一个单台服务器 QPS(每秒请求数)在100左右的 ASP.NET Core 站点部署到了 Linux 服务器上,这是我们解决了在 .NET Core 上使用 EnyimMem ...

  2. Django项目在Linux服务器上部署和躺过的坑

    引言 在各方的推荐下,领导让我在测试环境部署之前开发的测试数据预报平台.那么问题来了,既然要在服务器上部署, 就需要准备: 1.linux服务器配置 2.linux安装python环境搭建与配置 3. ...

  3. linux服务器上部署项目,同时运行两个或多个tomcat

    在阿里云服务器上部署项目的时候,想使用阿里云提供的负载均衡服务并创建两个监听(如图), 但需要一台服务器提供两个端口,于是就请教前辈并查询资料,得知: 一台服务器提供两个端口,有两种方式: 1.一个t ...

  4. springboot 定时任务部署至linux服务器上后会执行两次问题

    springboot定时任务在本地运行时,正常执行且只执行一次,但是在maven打包成war包,部署至linux服务器上之后,定时任务奇怪的执行了两次. 由于未做负载均衡,所以可以先排除是因为多台服务 ...

  5. ireport部署到Linux服务器上遇到的问题解决

    ireport报表在本地Windows环境运行正常,一旦部署到Linux环境上出现了如下问题: 1.打开报表,后台直接报net.sf.jasperreports.engine.util.JRFontN ...

  6. Linux服务器上Tomcat的Web工程部署

    Linux服务器上Tomcat的Web工程部署 部署Web应用到Tomcat服务器就是将开放好的JavaWeb应用打包成war包,然后发布到tomcat服务器的webapps目录下: 步骤1,先进入t ...

  7. 如何在Linux服务器上部署禅道

    最近换了新的项目团队,由于新团队比较年轻化,没有实行正规的项目管理,于是我自告奋勇要为团队管理出一份力,帮助团队建立敏捷化的项目管理,经过多方考究和对比后,选择了目前较受欢迎的开源项目管理软件:禅道. ...

  8. Dell Omsa在Linux服务器上安装部署

    前言 本页详述了在一台Linux(RHEL6.4 x86_64)服务器上部署安装OMSA的通用做法,包括OMSA软件的获取方法和安装步骤. 演示环境: PowerEdge R620, RHEL 6.4 ...

  9. 把 web 项目部署到 Linux 服务器上

    1.打开 eclipse,在已经完成的 web 项目上面点击右键,选择 export,然后选择导出成 war 包. 以部署 SMBMS 项目为例   2.项目打包成 war ,选择项目导出到的位置. ...

随机推荐

  1. Java.稀疏数组

    package array; public class demo06 { public static void main(String[] args) { //创建一个二维数组 11*11 int[] ...

  2. npm相关资料

    npm 源的配置 命令行模式 npm install XXX --registry https://registry.npmmirror.com/ 项目模式 在项目更目录新建.npmrc 文件,内容 ...

  3. python+tkinter 简单的登录窗口demo

    一个简单的登录窗口布局,可以用于日常快速搭建一个简单的窗口类. from tkinter import * import tkinter.messagebox class LoginUi: def _ ...

  4. C++ 加速(卡常)技巧【超级 快读、快写】

    C++ \texttt{C++} C++ 加速技巧 快读快写 快读 inline int read() { int x = 0, w = 0; char ch = 0; while (!isdigit ...

  5. Linux串口编程进阶

    在<Linux串口编程>编程一文中介绍了串口应用中常用的基本操作,如:串口打开关闭.串口设置.数据收发等.本篇文章主要基于常规串口操作进行了扩充,主要介绍如下操作: Linux系统使用非标 ...

  6. 从零开始在centos搭建博客(一)

    本篇为安装篇. 基于centos 7.9,大部分东西使用docker安装. 软件列表:docker + mysql + wordpress 安装docker yum install -y yum-ut ...

  7. Vue3.0工程创建 && setup、ref、reactive函数 && Vue3.0响应式实现原理

    1 # 一.创建Vue3.0工程 2 # 1.使用vue-cli创建 3 # 官方文档: https://cli.vuejs.org/zh/guide/creating-a-project.html# ...

  8. Shell 编程基础语法

    # shell脚本 # 如何运行shell脚本 sh test.sh source test.sh ./test.sh # 需要有执行权限 # source和其他两种的区别是.source不会开新进程 ...

  9. 一般处理程序ashx接入微信服务器配置

    首先在威信后台填写服务器相关配置,这里按照说明直接填写就好了.配置提交前在需要在我们服务端先准备号接受微信请求的url,对请求内容做验证. 1.准备接口配置信息 A.服务器URL 该URL用于开发者接 ...

  10. vscode 源代码不能自动stage change

    前言 vscode的强大不用赘述了,当你开始使用自然就会爱上他.围绕着IDE的编写体验,有很多强大的自带或者第三方插件,可以做到,编码,git管理,甚至部署一条龙[我司就有这样的插件],让大家沉迷其中 ...