{"id":5197,"date":"2017-04-04T12:20:18","date_gmt":"2017-04-04T09:20:18","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=5197"},"modified":"2017-04-04T12:20:18","modified_gmt":"2017-04-04T09:20:18","slug":"mysql-fast-shutdown","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=5197","title":{"rendered":"[mysql] Fast shutdown"},"content":{"rendered":"<p>\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0431\u0430\u0437\u0443, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0445\u0430\u043a\u043e\u043c: \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0433\u0440\u044f\u0437\u043d\u044b\u0439 \u043a\u0435\u0448\u044c (\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043b\u0438\u043c\u0438\u0442 \u0433\u0440\u044f\u0437\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430 \u0432 0) \u0438 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e <strong>restart<\/strong>. \u0418 \u0442\u0430\u043a:<\/p>\n<p><code>mysql&gt;set global innodb_max_dirty_pages_pct=0;<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0436\u0438\u0434\u0430\u0435\u043c\u0441\u044f, \u043f\u043e\u043a\u0430 \u0432\u0435\u0441\u044c \u043a\u0435\u0448 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u0441\u044f (\u0440\u0430\u0437 \u0432 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0433\u0440\u044f\u0437\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430):<\/p>\n<p><!--more--><\/p>\n<p><code>$ mysqladmin ext -i10 | grep dirty<br \/>\n| Innodb_buffer_pool_pages_dirty\u00a0\u00a0\u00a0\u00a0| 1823484\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|<br \/>\n| Innodb_buffer_pool_pages_dirty\u00a0\u00a0\u00a0\u00a0| 1821293\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|<br \/>\n| Innodb_buffer_pool_pages_dirty\u00a0\u00a0\u00a0\u00a0| 1818938\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|<br \/>\n...<br \/>\n| Innodb_buffer_pool_pages_dirty\u00a0\u00a0\u00a0\u00a0| 0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n<\/code><\/p>\n<p>\u0442\u043e \u0435\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>Innodb_buffer_pool_pages_dirty<\/strong> \u0431\u0443\u0434\u0435\u0442 0. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u0443<\/p>\n<p><code># \/etc\/init.d\/mysql restart<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0431\u0430\u0437\u0443, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0445\u0430\u043a\u043e\u043c: \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0433\u0440\u044f\u0437\u043d\u044b\u0439 \u043a\u0435\u0448\u044c (\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043b\u0438\u043c\u0438\u0442 \u0433\u0440\u044f\u0437\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430 \u0432 0) \u0438 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e restart. \u0418 \u0442\u0430\u043a: mysql&gt;set global innodb_max_dirty_pages_pct=0; \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0436\u0438\u0434\u0430\u0435\u043c\u0441\u044f, \u043f\u043e\u043a\u0430 \u0432\u0435\u0441\u044c \u043a\u0435\u0448 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u0441\u044f (\u0440\u0430\u0437 \u0432 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0433\u0440\u044f\u0437\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430):<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-5197","post","type-post","status-publish","format-standard","hentry","category-databases"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5197"}],"version-history":[{"count":1,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5197\/revisions"}],"predecessor-version":[{"id":5198,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5197\/revisions\/5198"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}