{"id":407302,"date":"2024-06-29T19:29:24","date_gmt":"2024-06-29T19:29:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=407302"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=407302","title":{"rendered":"<span>\u0422\u044e\u043d\u0438\u043d\u0433 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 PostgreSQL \u043f\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 Zabbix<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ob\/8x\/wh\/ob8xwhaqhk5mka7mow8nupxh9ma.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ob\/8x\/wh\/ob8xwhaqhk5mka7mow8nupxh9ma.png\"\/><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0421\u0423\u0411\u0414 PostgreSQL, \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Zabbix.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 Zabbix, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u044f\u043c\u043e \u0438\u043b\u0438 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e \u0443\u0442\u0438\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0411\u0414. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0441\u044f \u043e\u0434\u0438\u043d \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u0444\u0430\u043a\u0442. \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0431\u044b\u043b \u0442\u0430\u043a\u043e\u0439 <a href=\"https:\/\/support.zabbix.com\/browse\/ZBXNEXT-782\">ZBXNEXT-782<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0440\u0435\u0439\u0437\u0438\u043b \u0441\u0430\u043c \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0412\u043b\u0430\u0434\u044b\u0448\u0435\u0432 (\u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u0440 Zabbix \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438) \u0430\u0436 \u0432 2011 \u0433\u043e\u0434\u0443. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 Zabbix 5.4 \u0431\u044b\u043b\u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043a \u0411\u0414. \u0422\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u043d\u044c\u0448\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u043b\u043b\u0435\u0440 \u0438\u043c\u0435\u043b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0411\u0414 \u0434\u043b\u044f \u0430\u043f\u0434\u0435\u0439\u0442\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0445\u043e\u0441\u0442\u043e\u0432. \u041f\u043e\u043b\u043b\u0435\u0440\u044b \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0441\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u043b\u043b\u0435\u0440, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 Zabbix Server \u0437\u0430\u043d\u0438\u043c\u0430\u043b \u043e\u0434\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043a \u0411\u0414.<\/p>\n<p>  \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u044d\u0442\u0438\u0445 \u043f\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u2014 1000 \u0448\u0442\u0443\u043a. \u041d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a \u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e. \u0412\u044b\u0445\u043e\u0434 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u043a\u0441\u0438. \u0412 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044f\u0445 \u0442\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442. \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 Zabbix \u0438 PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430. \u041f\u043e\u0433\u043d\u0430\u043b\u0438!<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<ul>\n<li><b>DBSyncers<\/b> \u2014 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b Zabbix-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0411\u0414. \u0418\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 4, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0442\u044c 100. \u0412 Zabbix \u0435\u0441\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a NVPS (new value per second \u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443). \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 1 DBSyncer \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e 1000 NVPS. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 DBSyncer \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u043d\u0430 100% \u0438\u043b\u0438 \u043e\u043a\u043e\u043b\u043e \u0442\u043e\u0433\u043e, \u0442\u043e \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0446\u0435\u043f\u043d\u0443\u044e \u0440\u0435\u0430\u043a\u0446\u0438\u044e \u0438 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/li>\n<li><b>Configuration Syncer<\/b> \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Zabbix. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 60 \u0441\u0435\u043a\u0443\u043d\u0434, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0411\u0414. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0437\u0430\u043d\u044f\u0442, \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>CacheUpdateFrequency<\/i> (\u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 3600 \u0441\u0435\u043a\u0443\u043d\u0434). \u042d\u0442\u043e \u0442\u043e\u0436\u0435 \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0438\u0442 \u0411\u0414.<\/li>\n<li><b>HousekeepingFrequency<\/b> \u2014 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0432 1 \u0447\u0430\u0441, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0438\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d, \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 4 \u0447\u0430\u0441\u0430.<\/li>\n<\/ul>\n<p>  \u041a \u0411\u0414 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0438 \u0432\u0435\u0431-\u0431\u044d\u043a\u044d\u043d\u0434. \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 php-fpm (\u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u0444\u0430\u0439\u043b <i>zabbix.conf<\/i> \u0432 <i>\/etc\/php-fpm.d<\/i>) \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <i>pm.max_children<\/i>.<\/p>\n<p>  \u0412 PostgreSQL \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u043a \u0411\u0414 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <i>max_connections<\/i>. \u0421\u0442\u043e\u0438\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u043b\u0435\u0440\u044b, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e Zabbix \u043c\u043b\u0430\u0434\u0448\u0435 5.4.<\/p>\n<p>  \u0414\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 PostgreSQL:<\/p>\n<ul>\n<li><b>shared_buffers<\/b> \u2014 \u0431\u0443\u0444\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u044f\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 \u0434\u0438\u0441\u043a. \u041e\u0431\u044b\u0447\u043d\u043e \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 25% \u043e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u041e\u0417\u0423 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/li>\n<li><b>effective_cache_size<\/b> \u2014 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u041e\u0421 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e 50%.<\/li>\n<li><b>huge_pages<\/b> \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0431\u0443\u0434\u0443\u0442 \u043b\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/228793\/\">\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/a> \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u0431\u0449\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e try \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c. \u042f\u0434\u0440\u043e \u041e\u0421 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/li>\n<li><b>maintenance_work_mem<\/b> \u2014 \u0437\u0430\u0434\u0430\u0451\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0451\u043c \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0411\u0414 (vacuum, create index, alter table add foreign key). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 64\u041c\u0431. \u041c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c.<\/li>\n<li><b>work_mem<\/b> \u2014 \u0437\u0430\u0434\u0430\u0451\u0442 \u043e\u0431\u044a\u0451\u043c \u043f\u0430\u043c\u044f\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0445\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446 \u0434\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 4\u041c\u0431.<\/li>\n<li><b>max_worker_processes<\/b> \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/li>\n<li><b>max_parallel_workers<\/b> \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u0421\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 <i>max_worker_processes<\/i> \u043a <i>max_parallel_workers<\/i> \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0432\u043d\u044f\u0442\u044c\u0441\u044f \u0447\u0438\u0441\u043b\u0443 \u044f\u0434\u0435\u0440 CPU.<\/li>\n<li><b>max_parallel_maintenance_workers<\/b> \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439.<\/li>\n<li><b>max_parallel_workers_per_gather<\/b> \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0443\u0437\u043b\u043e\u043c Gather \u0438\u043b\u0438 Gather Merge. \u0421\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 <i>max_parallel_workers_per_gather<\/i> \u043a <i>max_parallel_maintenance_workers<\/i> \u0434\u043e\u043b\u0436\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044f\u0434\u0435\u0440. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u00bd \u0438\u043b\u0438 \u00bc.<\/li>\n<\/ul>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0430\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0435 (autovacuum). PostgreSQL \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Multiversion Concurrency Control (MVCC) \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u2014 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u00ab\u043c\u0435\u0440\u0442\u0432\u044b\u0435\u00bb \u043a\u043e\u0440\u0442\u0435\u0436\u0438 (\u0441\u0442\u0440\u043e\u043a\u0438), \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0430\u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0435, \u043d\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u0435\u043c\u044b\u0435 \u0441 \u0434\u0438\u0441\u043a\u0430. \u041c\u0435\u0440\u0442\u0432\u044b\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u0438\u0434\u043d\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c, \u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e.<\/p>\n<p>  \u0412 Zabbix \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u043c\u043d\u043e\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \/ \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u0431\u043b\u0438\u0446\u044b events, history, history_uint, trends \u0438 trends_uint. \u042d\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u0434\u043b\u044f \u0431\u0435\u0441\u043f\u0435\u0440\u0435\u0431\u043e\u0439\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0411\u0414 \u0432\u0430\u0436\u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0430\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0438.<\/p>\n<p>  \u041f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0430\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u043e \u0434\u0432\u0443\u0445 \u0432\u0435\u0449\u0430\u0445:<\/p>\n<ul>\n<li>\u041a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u043e\u0447\u0438\u0449\u0430\u044e\u0442\u0441\u044f \u00ab\u043c\u0435\u0440\u0442\u0432\u044b\u0435\u00bb \u043a\u043e\u0440\u0442\u0435\u0436\u0438.<\/li>\n<li>\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0440\u0442\u0432\u044b\u0445 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0441\u0432\u0435\u0434\u044f \u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/li>\n<\/ul>\n<p>  \u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u00ab\u043c\u0435\u0440\u0442\u0432\u044b\u0445\u00bb \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041b\u0443\u0447\u0448\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b: <i>autovacuum_vacuum_threshold<\/i> \u0438 <i>autovacuum_vacuum_scale_factor<\/i>. \u041f\u0435\u0440\u0432\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u00ab\u043c\u0435\u0440\u0442\u0432\u044b\u043c\u0438\u00bb \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0430\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0438, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u00ab\u043c\u0435\u0440\u0442\u0432\u044b\u0445\u00bb \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a PostgreSQL \u043d\u0430\u0447\u043d\u0435\u0442 \u0430\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <i>autovacuum_vacuum_threshold = 50<\/i> \u0438 <i>autovacuum_vacuum_scale_factor = 0.01<\/i>. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e PostgreSQL \u043d\u0430\u0447\u043d\u0435\u0442 \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0435\u0441\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0440\u0442\u0432\u044b\u0445 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 1% \u0438 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 50 \u043c\u0435\u0440\u0442\u0432\u044b\u0445 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439.<\/p>\n<p>  \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0440\u0442\u0432\u044b\u0445 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0442\u0440\u043e\u0442\u0442\u043b\u0438\u043d\u0433\u0430 \u0430\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0438. \u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u2014 \u044d\u0442\u043e \u0444\u043e\u043d\u043e\u0432\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  \u0422\u0440\u043e\u0442\u0442\u043b\u0438\u043d\u0433 \u0430\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <i>autovacuum_vacuum_cost_delay<\/i> \u0438 <i>autovacuum_vacuum_cost_limit<\/i>. \u041f\u0435\u0440\u0432\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u044f, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u043f\u044f\u0449\u0435\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0434\u0435\u043b\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0430\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0432 \u0441\u043f\u044f\u0449\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0434\u0435\u043b\u0430.<\/p>\n<p>  \u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<\/p>\n<ul>\n<li>Vacuum_cost_page_hit = 1<\/li>\n<li>Vacuum_cost_page_miss = 10<\/li>\n<li>Vacuum_cost_page_dirty = 20<\/li>\n<\/ul>\n<p>  \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f <i>autovacuum_vacuum_cost_delay = 20ms<\/i> \u0438 <i>autovacuum_vacuum_cost_limit = 3000<\/i> \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442, \u0447\u0442\u043e \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c 150 000 (1000\/20 * 3000) \u0435\u0434\u0438\u043d\u0438\u0446 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u042d\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 1171 \u041c\u0411\/\u0441 (150000 x 8\/1024) \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0438\u0437 shared_buffers, 117 \u041c\u0411\/\u0441 (150000 x 8\/1024\/10) \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0438\u0437 \u0441 \u0434\u0438\u0441\u043a\u0430 \u0438 58 \u041c\u0411\/\u0441 (150000 x 8\/1024\/20) \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0430\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0438.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c <i>autovacuum_max_workers = 6<\/i> \u0438 <i>maintenance_work_mem = 64\u041c\u0431<\/i>. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 384 \u041c\u0431 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0430\u0432\u0442\u043e\u043e\u0447\u0438\u0441\u0442\u043a\u0438.<br \/>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u00ab\u043c\u0435\u0440\u0442\u0432\u044b\u0445\u00bb \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439:<\/p>\n<pre><code class=\"sql\">SELECT relname,        n_live_tup,        n_dead_tup,        n_dead_tup*100\/n_live_tup::float AS dead_percent,        last_vacuum,        last_autovacuum,        autovacuum_count  FROM pg_stat_user_tables  WHERE n_dead_tup &lt;> 0  AND n_live_tup &lt;>0  ORDER BY relname;<\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 PostgreSQL \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 PGTune.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u0430\u043c \u0431\u044b\u043b \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u044d\u0442\u043e\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u0437\u043e\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0435\u0439 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u0438 Zabbix.<\/p>\n<p>  <b>\u0410 \u0435\u0449\u0451 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c:<\/b><\/p>\n<ul>\n<li><a href=\"https:\/\/gals.software\/solutions\/free\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0443 \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/galssoftware\/blog\/526018\/\">Zabbix \u043f\u043e\u0434 \u0437\u0430\u043c\u043a\u043e\u043c: \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u043f\u0446\u0438\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 Zabbix \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u0438 \u0441\u043d\u0430\u0440\u0443\u0436\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/galssoftware\/blog\/523994\/\">\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c CMDB \u0438 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u0430\u0440\u0442\u0443 \u043a Zabbix<\/a><\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u043d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434, \u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0437\u0430\u044f\u0432\u043a\u0443 \u0432 \u0444\u043e\u0440\u043c\u0435 \u043d\u0430\u0448\u0435\u0439 <a href=\"https:\/\/gals.software\/#feedback\">\u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438<\/a> \u2014 \u043f\u043e\u043e\u0431\u0449\u0430\u0435\u043c\u0441\u044f.<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/591717\/\"> https:\/\/habr.com\/ru\/articles\/591717\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ob\/8x\/wh\/ob8xwhaqhk5mka7mow8nupxh9ma.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ob\/8x\/wh\/ob8xwhaqhk5mka7mow8nupxh9ma.png\"\/><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0421\u0423\u0411\u0414 PostgreSQL, \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Zabbix.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 Zabbix, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u044f\u043c\u043e \u0438\u043b\u0438 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e \u0443\u0442\u0438\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0411\u0414. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0441\u044f \u043e\u0434\u0438\u043d \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u0444\u0430\u043a\u0442. \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0431\u044b\u043b \u0442\u0430\u043a\u043e\u0439 <a href=\"https:\/\/support.zabbix.com\/browse\/ZBXNEXT-782\">ZBXNEXT-782<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0440\u0435\u0439\u0437\u0438\u043b \u0441\u0430\u043c \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0412\u043b\u0430\u0434\u044b\u0448\u0435\u0432 (\u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u0440 Zabbix \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438) \u0430\u0436 \u0432 2011 \u0433\u043e\u0434\u0443. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 Zabbix 5.4 \u0431\u044b\u043b\u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043a \u0411\u0414. \u0422\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u043d\u044c\u0448\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u043b\u043b\u0435\u0440 \u0438\u043c\u0435\u043b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0411\u0414 \u0434\u043b\u044f \u0430\u043f\u0434\u0435\u0439\u0442\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0445\u043e\u0441\u0442\u043e\u0432. \u041f\u043e\u043b\u043b\u0435\u0440\u044b \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0441\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u043b\u043b\u0435\u0440, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 Zabbix Server \u0437\u0430\u043d\u0438\u043c\u0430\u043b \u043e\u0434\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043a \u0411\u0414.<\/p>\n<p>  \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u044d\u0442\u0438\u0445 \u043f\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u2014 1000 \u0448\u0442\u0443\u043a. \u041d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a \u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e. \u0412\u044b\u0445\u043e\u0434 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u043a\u0441\u0438. \u0412 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044f\u0445 \u0442\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442. \u041f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 Zabbix \u0438 PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430. \u041f\u043e\u0433\u043d\u0430\u043b\u0438!  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-407302","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/407302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=407302"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/407302\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=407302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=407302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=407302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}