{"id":471,"date":"2020-02-07T20:55:27","date_gmt":"2020-02-07T17:55:27","guid":{"rendered":"http:\/\/microimpuls.com\/docs\/micropvr\/%d0%ba%d0%be%d0%bd%d1%84%d0%b8%d0%b3%d1%83%d1%80%d0%b0%d1%86%d0%b8%d1%8f\/%d1%80%d0%b5%d0%ba%d0%be%d0%bc%d0%b5%d0%bd%d0%b4%d0%b0%d1%86%d0%b8%d0%b8-%d0%bf%d0%be-%d1%82%d1%8e%d0%bd%d0%b8%d0%bd%d0%b3%d1%83-%d0%be%d1%81"},"modified":"2022-08-17T10:40:47","modified_gmt":"2022-08-17T07:40:47","slug":"os-tuning","status":"publish","type":"docs","link":"https:\/\/microimpuls.com\/en\/docs\/micropvr\/configuration\/os-tuning","title":{"rendered":"Recommendations for OS tuning"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Recommended kernel parameters<\/h2>\n\n\n\n<p>Changes must be made to the file \u00ab\/etc\/sysctl.conf\u00ab<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">kernel.shmmax = 2473822720\nkernel.shmall = 4097152000\nnet.core.rmem_default = 8388608\nnet.core.rmem_max = 16777216\nnet.core.wmem_default = 8388608\nnet.core.wmem_max = 16777216\nnet.ipv4.tcp_syncookies = 1\nnet.ipv4tcp_tw_recycle = 0\nnet.ipv4tcp_tw_reuse = 0\nnet.ipv4.tcp_keepalive_time = 10\nnet.ipv4.tcp_fin_timeout = 5<\/pre>\n\n\n\n<p>Then execute a command to apply the changes:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sysctl -p<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Additional OS settings with a very large number of simultaneous connections<\/h2>\n\n\n\n<p>In the file <code>\/etc\/security\/limits.conf<\/code> you must prescribe:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">* soft nofile 16384\n* hard nofile 16384<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Recommended file system type and mount options for HDD storage<\/h2>\n\n\n\n<p>To ensure maximum storage speed, it is recommended to use XFS with the following options:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkfs.xfs -f -d su=512k -d sw= -l su=256k \/dev\/<\/pre>\n\n\n\n<p>where:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>swing<\/code> \u2014 the number of disks in the RAID array.<\/li><li><code>device<\/code> \u2014 device name, e.g. sdc1.<\/li><\/ul>\n\n\n\n<p>Mounting options in <code>\/etc\/fstab<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/dev\/  xfs async,noatime,nodiratime,attr2,nobarrier,logbufs=8,logbsize=256k,osyncisdsync 0<\/pre>\n\n\n\n<p>where:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>device<\/code> \u2014 device name, e.g. sdc1.<\/li><li><code>mountpoint<\/code> \u2014 mounting point, for example <strong>\/opt\/storage<\/strong>.<\/li><\/ul>\n\n\n\n<p>For SSD storage, you also need to add options <strong>discard, relatime<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Number of hardware queues on the network map<\/h2>\n\n\n\n<p>With a large volume of UDP traffic, you need to use Enterprise-level network cards that have hardware packet queues. However, even in this case, by default, these queues may not be activated:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#ethtool -l enp3s0f1:\nChannel parameters for enp3s0f1:\nPre-set maximums:\nRX: 0\nTX: 0\nOther: 1\nCombined: 8\nCurrent hardware settings:\nRX: 0\nTX: 0\nOther: 1\nCombined: 1<\/pre>\n\n\n\n<p>In this example \u2014 a total of 8 is available, but 1 is used. To change that:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#ethtool -L enp4s0f1 combined 8\n#ethtool -l enp4s0f1\nChannel parameters for enp3s0f1:\nPre-set maximums:\nRX: 0\nTX: 0\nOther: 1\nCombined: 8\nCurrent hardware settings:\nRX: 0\nTX: 0\nOther: 1\nCombined: 8<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Modification of processors<\/h2>\n\n\n\n<p>\u0414\u043b\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 CPU \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u044f\u0434\u0440\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c performance: https:\/\/ixnfo.com\/izmenenie-cpu-scaling-governor-v-linux.html.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Increase in txqueuelen<\/h2>\n\n\n\n<p>The default value of 1000 may not be enough for a packet queue, it is worth putting 10,000:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ifconfig eno1 ifconfig eno1 txqueuelen 10000<\/pre>","protected":false},"featured_media":0,"parent":464,"menu_order":2,"comment_status":"open","ping_status":"closed","template":"","meta":{"_links_to":"","_links_to_target":""},"doc_tag":[],"class_list":["post-471","docs","type-docs","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u044e\u043d\u0438\u043d\u0433\u0443 \u041e\u0421<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/microimpuls.com\/en\/docs\/micropvr\/configuration\/os-tuning\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u044e\u043d\u0438\u043d\u0433\u0443 \u041e\u0421\" \/>\n<meta property=\"og:description\" content=\"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0434\u0440\u0430 \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0432 \u0444\u0430\u0439\u043b &#171;\/etc\/sysctl.conf&#171;: kernel.shmmax = 2473822720 kernel.shmall = 4097152000 net.core.rmem_default = 8388608 net.core.rmem_max = 16777216 net.core.wmem_default = 8388608 net.core.wmem_max = 16777216 net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_tw_recycle = 0 net.ipv4.tcp_tw_reuse = 0 net.ipv4.tcp_keepalive_time = 10 net.ipv4.tcp_fin_timeout = 5 \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439: sysctl -p \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041e\u0421 \u043f\u0440\u0438 \u043e\u0447\u0435\u043d\u044c [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/microimpuls.com\/en\/docs\/micropvr\/configuration\/os-tuning\/\" \/>\n<meta property=\"og:site_name\" content=\"Microimpuls\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-17T07:40:47+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/microimpuls.com\/docs\/micropvr\/configuration\/os-tuning\",\"url\":\"https:\/\/microimpuls.com\/docs\/micropvr\/configuration\/os-tuning\",\"name\":\"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u044e\u043d\u0438\u043d\u0433\u0443 \u041e\u0421\",\"isPartOf\":{\"@id\":\"https:\/\/micro.im\/#website\"},\"datePublished\":\"2020-02-07T17:55:27+00:00\",\"dateModified\":\"2022-08-17T07:40:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/microimpuls.com\/docs\/micropvr\/configuration\/os-tuning#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/microimpuls.com\/docs\/micropvr\/configuration\/os-tuning\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/microimpuls.com\/docs\/micropvr\/configuration\/os-tuning#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\/\/micro.im\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MicroPVR\",\"item\":\"https:\/\/microimpuls.com\/docs\/micropvr\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\",\"item\":\"https:\/\/microimpuls.com\/docs\/micropvr\/configuration\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u044e\u043d\u0438\u043d\u0433\u0443 \u041e\u0421\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/micro.im\/#website\",\"url\":\"https:\/\/micro.im\/\",\"name\":\"Microimpuls\",\"description\":\"\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f OTT \u0438 IPTV\",\"publisher\":{\"@id\":\"https:\/\/micro.im\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/micro.im\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/micro.im\/#organization\",\"name\":\"Microimpuls\",\"url\":\"https:\/\/micro.im\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/micro.im\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/microimpuls.com\/wp-content\/uploads\/2024\/12\/mi-logo-square-en-black.png\",\"contentUrl\":\"https:\/\/microimpuls.com\/wp-content\/uploads\/2024\/12\/mi-logo-square-en-black.png\",\"width\":208,\"height\":219,\"caption\":\"Microimpuls\"},\"image\":{\"@id\":\"https:\/\/micro.im\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Recommendations for OS tuning","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/microimpuls.com\/en\/docs\/micropvr\/configuration\/os-tuning\/","og_locale":"en_US","og_type":"article","og_title":"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u044e\u043d\u0438\u043d\u0433\u0443 \u041e\u0421","og_description":"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0434\u0440\u0430 \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0432 \u0444\u0430\u0439\u043b &#171;\/etc\/sysctl.conf&#171;: kernel.shmmax = 2473822720 kernel.shmall = 4097152000 net.core.rmem_default = 8388608 net.core.rmem_max = 16777216 net.core.wmem_default = 8388608 net.core.wmem_max = 16777216 net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_tw_recycle = 0 net.ipv4.tcp_tw_reuse = 0 net.ipv4.tcp_keepalive_time = 10 net.ipv4.tcp_fin_timeout = 5 \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439: sysctl -p \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u041e\u0421 \u043f\u0440\u0438 \u043e\u0447\u0435\u043d\u044c [&hellip;]","og_url":"https:\/\/microimpuls.com\/en\/docs\/micropvr\/configuration\/os-tuning\/","og_site_name":"Microimpuls","article_modified_time":"2022-08-17T07:40:47+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/microimpuls.com\/docs\/micropvr\/configuration\/os-tuning","url":"https:\/\/microimpuls.com\/docs\/micropvr\/configuration\/os-tuning","name":"Recommendations for OS tuning","isPartOf":{"@id":"https:\/\/micro.im\/#website"},"datePublished":"2020-02-07T17:55:27+00:00","dateModified":"2022-08-17T07:40:47+00:00","breadcrumb":{"@id":"https:\/\/microimpuls.com\/docs\/micropvr\/configuration\/os-tuning#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/microimpuls.com\/docs\/micropvr\/configuration\/os-tuning"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/microimpuls.com\/docs\/micropvr\/configuration\/os-tuning#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/micro.im\/"},{"@type":"ListItem","position":2,"name":"MicroPVR","item":"https:\/\/microimpuls.com\/docs\/micropvr"},{"@type":"ListItem","position":3,"name":"\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f","item":"https:\/\/microimpuls.com\/docs\/micropvr\/configuration"},{"@type":"ListItem","position":4,"name":"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u044e\u043d\u0438\u043d\u0433\u0443 \u041e\u0421"}]},{"@type":"WebSite","@id":"https:\/\/micro.im\/#website","url":"https:\/\/micro.im\/","name":"Microimpulses","description":"Comprehensive solutions for OTT and IPTV","publisher":{"@id":"https:\/\/micro.im\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/micro.im\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/micro.im\/#organization","name":"Microimpulses","url":"https:\/\/micro.im\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/micro.im\/#\/schema\/logo\/image\/","url":"https:\/\/microimpuls.com\/wp-content\/uploads\/2024\/12\/mi-logo-square-en-black.png","contentUrl":"https:\/\/microimpuls.com\/wp-content\/uploads\/2024\/12\/mi-logo-square-en-black.png","width":208,"height":219,"caption":"Microimpuls"},"image":{"@id":"https:\/\/micro.im\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs\/471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/comments?post=471"}],"version-history":[{"count":5,"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs\/471\/revisions"}],"predecessor-version":[{"id":3154,"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs\/471\/revisions\/3154"}],"up":[{"embeddable":true,"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs\/464"}],"prev":[{"title":"Micropvs configuration parameters","link":"https:\/\/microimpuls.com\/en\/docs\/micropvr\/configuration\/micropvs-conf","href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs\/926"}],"wp:attachment":[{"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/media?parent=471"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/doc_tag?post=471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}