{"id":286358,"date":"2017-05-15T15:55:03","date_gmt":"2017-05-15T11:55:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=286358"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2017-05-15T11:55:03","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=286358","title":{"rendered":"\u041e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432 Instagram \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 Python \u0438 \u043d\u0430\u0447\u0430\u043b\u0438 \u0436\u0438\u0442\u044c"},"content":{"rendered":"<p>\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0432 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 Python (GC), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044f \u0438 \u0443\u0434\u0430\u043b\u044f\u044f \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, Instagram \u0441\u0442\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 10% \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u0414\u0430-\u0434\u0430, \u0432\u044b \u043d\u0435 \u043e\u0441\u043b\u044b\u0448\u0430\u043b\u0438\u0441\u044c! \u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0432 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u044d\u0448\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u0425\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u0422\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0441\u0442\u0435\u0433\u043d\u0438\u0442\u0435 \u0440\u0435\u043c\u043d\u0438!<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/50a\/374\/689\/50a37468992b4e4d80332d563481d537.jpg\"\/><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#c75733\">\u041a\u0430\u043a \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440<\/font><\/h2>\n<p>  \u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 Instagram \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 Django \u0432 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u0433\u0434\u0435 \u043c\u0430\u0441\u0442\u0435\u0440-\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0441\u0430\u043c \u0441\u0435\u0431\u044f, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c uWSGI \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 prefork, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u0441\u0442\u0435\u0440-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438. <\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443 Django \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u0430\u043c\u044f\u0442\u044c, \u043c\u0430\u0441\u0442\u0435\u0440-\u043f\u0440\u043e\u0446\u0435\u0441\u0441 uWSGI \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c (RSS) \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u0435\u043b.<\/p>\n<h2><font color=\"#c75733\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c<\/font><\/h2>\n<p>  \u0421\u043f\u0435\u0440\u0432\u0430 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 RSS \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0441\u0442\u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0438\u0445 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442 \u043c\u0430\u0441\u0442\u0435\u0440. \u041c\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e, \u0445\u043e\u0442\u044f RSS \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 250 \u041c\u0411, \u0440\u0430\u0437\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0441 250 \u041c\u0411 \u0434\u043e \u043f\u043e\u0447\u0442\u0438 140 \u041c\u0411 (\u0440\u0430\u0437\u043c\u0435\u0440 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <code>\/proc\/PID\/smaps<\/code>). \u0427\u0438\u0441\u043b\u0430 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f, \u043d\u043e \u0442\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c (\u043f\u043e\u0447\u0442\u0438 \u043d\u0430 1\/3 \u043e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u043f\u0430\u043c\u044f\u0442\u0438), \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0435\u0433\u043e \u0436\u0438\u0437\u043d\u0438.<\/p>\n<h2><font color=\"#c75733\">\u041d\u0430\u0448\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435: Copy-on-Read<\/font><\/h2>\n<p>  \u0412 \u044f\u0434\u0440\u0435 Linux \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Copy-on-write\">Copy-on-Write<\/a>, CoW), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u0414\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0435\u043b\u0438\u0442 \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u043c. \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<p>  \u041d\u043e \u0432 \u043c\u0438\u0440\u0435 Python \u0438\u0437-\u0437\u0430 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0441\u0441\u044b\u043b\u043e\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u0435\u0449\u0438. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 Python-\u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442 \u0435\u0433\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0441\u0441\u044b\u043b\u043e\u043a, \u0447\u0442\u043e \u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 CoW. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0441 Python \u043c\u044b \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Copy-on-Read (CoR)!<\/p>\n<pre><code class=\"cpp\">#define PyObject_HEAD                   \\     _PyObject_HEAD_EXTRA                \\     Py_ssize_t ob_refcnt;               \\     struct _typeobject *ob_type; ... typedef struct _object {     PyObject_HEAD } PyObject;<\/code><\/pre>\n<p>  \u041d\u0430\u0437\u0440\u0435\u0432\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043b\u0438 \u043c\u044b \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043b\u044f immutable \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u0445, \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a\u043e\u0434\u0430? \u0422\u0430\u043a \u043a\u0430\u043a <code>PyCodeObject<\/code> \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u201c\u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u201d <code>PyObject<\/code>, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0434\u0430. \u041d\u0430\u0448\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0434\u0435\u0435\u0439 \u0431\u044b\u043b\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a \u0434\u043b\u044f PyCodeObject.<\/p>\n<h2><font color=\"#c75733\">\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043d\u043e\u043c\u0435\u0440 1: \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043a\u043e\u0434\u0430<\/font><\/h2>\n<p>  \u041c\u044b \u0432 Instagram \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0445\u0430\u043a \u0432 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 CPython, \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043a\u043e\u0434\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u044d\u0442\u043e\u0442 CPython \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432.<\/p>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0441 \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043b: \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0448 \u0445\u0430\u043a \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u0449\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u043a\u043e\u043f\u0438\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043e\u0434\u0430. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043c\u044b \u0447\u0442\u043e-\u0442\u043e \u0443\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0438\u0437 \u0432\u0438\u0434\u0430. \u0412\u044b\u0432\u043e\u0434: \u043f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0435\u0439 \u0442\u0435\u043e\u0440\u0438\u0438, \u0434\u043e\u043a\u0430\u0436\u0438\u0442\u0435 \u0435\u0435.<\/p>\n<h2><font color=\"#c75733\">\u0410\u043d\u0430\u043b\u0438\u0437 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439<\/font><\/h2>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0432 \u043d\u0430 \u0442\u0435\u043c\u0443 Copy-on-Write, \u043c\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0438, \u0447\u0442\u043e Copy-on-Write \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 (page faults, \u0438\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f\u043c\u0438). \u041a\u0430\u0436\u0434\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f CoW \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432 Linux, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f, \u0438, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u0430\u0436\u0435 \u0432\u044b\u0432\u043e\u0434\u044f\u0442 \u0441\u0442\u0435\u043a-\u0442\u0440\u0435\u0439\u0441!<\/p>\n<p>  \u041c\u044b \u0441\u043d\u043e\u0432\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0435\u0433\u043e, \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u043b\u0438, \u043f\u043e\u043a\u0430 \u043c\u0430\u0441\u0442\u0435\u0440-\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0440\u043e\u0434\u0438\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0443\u0437\u043d\u0430\u043b\u0438 PID \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">perf record -e page-faults -g -p &lt;PID&gt;<\/code><\/pre>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0435\u043a-\u0442\u0440\u0435\u0439\u0441\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/dec\/d17\/a50\/decd17a508fb4c1b820a3a0608d87e8b.png\"\/><\/p>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0438\u0441\u044c \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u043b\u0438. \u0413\u043b\u0430\u0432\u043d\u044b\u043c \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u0432\u0430\u0435\u043c\u044b\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043a\u043e\u0434\u0430, \u0430 \u043c\u0435\u0442\u043e\u0434 <code>collect<\/code>, \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0439 <code>gcmodule.c<\/code>, \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430. \u041f\u043e\u0447\u0438\u0442\u0430\u0432, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 GC \u0432 CPython, \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0442\u0435\u043e\u0440\u0438\u044e:<\/p>\n<p>  \u0421\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u0432 CPython \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u0447\u0435\u043d\u044c \u043d\u0438\u0437\u043a\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u043d\u043d\u0438\u0445 \u0441\u0442\u0430\u0434\u0438\u044f\u0445. \u041e\u043d \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u043d\u044b\u0435 \u0441\u043f\u0438\u0441\u043a\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430 \u0441\u0432\u044f\u0437\u043d\u044b\u0435 \u0441\u043f\u0438\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f. \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0432\u044f\u0437\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0441\u0430\u043c\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c (\u0441\u043e\u0432\u0441\u0435\u043c \u043a\u0430\u043a <code>ob_refcount<\/code>), \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0441\u0432\u044f\u0437\u043d\u044b\u0445 \u0441\u043f\u0438\u0441\u043a\u0430\u0445 \u0432\u044b\u0437\u043e\u0432\u0435\u0442 CoW \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0430\u0434\u043d\u044b\u043c \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c.  <\/p>\n<pre><code class=\"cpp\">\/* GC information is stored BEFORE the object structure. *\/ typedef union _gc_head {     struct {         union _gc_head *gc_next;         union _gc_head *gc_prev;         Py_ssize_t gc_refs;     } gc;     long double dummy;  \/* force worst-case alignment *\/ } PyGC_Head;<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#c75733\">\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043d\u043e\u043c\u0435\u0440 2: \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430<\/font><\/h2>\n<p>  \u041d\u0443 \u0447\u0442\u043e \u0436, \u0440\u0430\u0437 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u0432\u0435\u0440\u043e\u043b\u043e\u043c\u043d\u043e \u043f\u0440\u0435\u0434\u0430\u043b \u043d\u0430\u0441, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e!<\/p>\n<p>  \u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 <code>gc.disable()<\/code> \u0432 \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u2013 \u0438 \u0441\u043d\u043e\u0432\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u0430! \u0415\u0441\u043b\u0438 \u0441\u043d\u043e\u0432\u0430 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 perf, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e <code>gc.collect<\/code> \u0432\u0441\u0435 \u0435\u0449\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u0441\u0435 \u0435\u0449\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f. \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0432 GDB, \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438, \u0447\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043d\u0430\u043c\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a (msgpack) \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>gc.enable()<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u0436\u0438\u0432\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430, \u0442\u0430\u043a \u0447\u0442\u043e <code>gc.disable()<\/code> \u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0431\u044b\u043b \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u0435\u043d.<\/p>\n<p>  \u041f\u0430\u0442\u0447\u0438\u0442\u044c msgpack \u0434\u043b\u044f \u043d\u0430\u0441 \u0431\u044b\u043b\u043e \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u0435 \u0441\u0442\u0430\u0432\u044f \u043d\u0430\u0441 \u0432 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442. \u041e\u0442\u0432\u0435\u0442 \u0441\u043d\u043e\u0432\u0430 \u043b\u0435\u0436\u0438\u0442 \u0432 <code>gcmodule.c<\/code>. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b <code>gc.disable<\/code> \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 <code>gc.set_threshold(0)<\/code>, \u0438 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043d\u0438 \u043e\u0434\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0435 \u0432\u0435\u0440\u043d\u0443\u043b\u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043c\u0435\u0441\u0442\u043e.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0438 \u043e\u0431\u044a\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441 140 \u041c\u0411 \u0434\u043e 225 \u041c\u0411, \u0438 \u043e\u0431\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u0435 \u0443\u043f\u0430\u043b \u0434\u043e 8 \u0413\u0411 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c 25% \u041e\u0417\u0423 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 Django. \u0421 \u0442\u0430\u043a\u0438\u043c \u0437\u0430\u043f\u0430\u0441\u043e\u043c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0442\u0430\u043a \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u043e\u0440\u043e\u0433 \u0434\u043b\u044f \u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0441\u043b\u043e\u044f Django \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c 10%.<\/p>\n<h2><font color=\"#c75733\">\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043d\u043e\u043c\u0435\u0440 3: \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430<\/font><\/h2>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u0442\u0435\u043e\u0440\u0438\u044e \u0432 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435: \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441\u0435\u0431\u044f \u0436\u0434\u0430\u0442\u044c, \u0438 \u043d\u0430\u0448 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u0432\u0430\u043b\u0438\u043b\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0441 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u043e\u043c \u043c\u0443\u0441\u043e\u0440\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0442\u0430\u043b \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435. \u041e\u0431\u044b\u0447\u043d\u043e \u043d\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0443\u0445\u043e\u0434\u0438\u043b\u043e \u043c\u0435\u043d\u0435\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434, \u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b\u0438, \u043e\u043d \u0437\u0430\u043d\u0438\u043c\u0430\u043b \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u043e 60 \u0441\u0435\u043a\u0443\u043d\u0434.  <\/p>\n<pre><code class=\"bash\">2016-05-02_21:46:05.57499 WSGI app 0 (mountpoint='') ready in 115 seconds on interpreter 0x92f480 pid: 4024654 (default app)<\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u0431\u0430\u0433 \u0431\u044b\u043b \u0441 \u0442\u0440\u0443\u0434\u043e\u043c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c. \u041f\u043e\u0441\u043b\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041a\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e, \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0430 \u044d\u0442\u043e\u043c \u0445\u043e\u0441\u0442\u0435 \u043f\u0430\u0434\u0430\u043b\u0430 \u043f\u043e\u0447\u0442\u0438 \u0434\u043e \u043d\u0443\u043b\u044f \u0438 \u043f\u0440\u044b\u0433\u0430\u043b\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e, \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044f \u0432\u0435\u0441\u044c \u043a\u044d\u0448. \u0422\u043e\u0433\u0434\u0430 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u043b \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0447\u0438\u0442\u0430\u0442\u044c \u0441 \u0434\u0438\u0441\u043a\u0430 (DSK 100%), \u0438 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e.<\/p>\n<p>  \u042d\u0442\u043e \u043c\u043e\u0433\u043b\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e Python \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0431\u043e\u0440 \u043c\u0443\u0441\u043e\u0440\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0439 \u0441\u043a\u0430\u0447\u043e\u043a \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430 \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0418 \u043e\u043f\u044f\u0442\u044c \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043f\u0435\u0440\u0432\u0430 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u0442\u043e, \u0430 \u043f\u043e\u0442\u043e\u043c \u0443\u0436\u0435 \u0440\u0435\u0448\u0438\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c. \u0418\u0442\u0430\u043a, \u044f \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0432\u044b\u0437\u043e\u0432 <code>Py_Finalize<\/code> \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0435 uWSGI \u0434\u043b\u044f Python, \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0438\u0441\u0447\u0435\u0437\u043b\u0430.<\/p>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c <code>Py_Finalize<\/code>. \u041c\u043d\u043e\u0433\u0438\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0447\u0438\u0441\u0442\u043a\u043e\u0439, \u0437\u0430\u0432\u0438\u0441\u0435\u043b\u0438 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432 CPython \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u043b\u0430\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u043b \u0441\u0431\u043e\u0440\u043a\u0443 \u043c\u0443\u0441\u043e\u0440\u0430.<\/p>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445. \u041c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0432\u0441\u0435\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445, \u043d\u043e \u044d\u0442\u043e \u0441\u043d\u043e\u0432\u0430 \u0441\u043b\u043e\u043c\u0430\u043b\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043f\u043e\u0441\u0442\u0440\u0430\u0434\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0448\u0438\u043d\u044b \u0441\u043e \u0441\u0442\u0430\u0440\u044b\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 (Sandy Bridge), \u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0435\u0449\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0412\u044b\u0432\u043e\u0434: \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0442\u0430\u0440\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432\/\u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043b\u0435\u0433\u0447\u0435 \u0432\u0441\u0435\u0433\u043e \u043b\u043e\u043c\u0430\u044e\u0442\u0441\u044f.<\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0448 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <code>atop<\/code> \u0432 \u043d\u0430\u0448 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0439\u043c\u0430\u0442\u044c \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u043a\u044d\u0448 \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f, \u0438 \u0432\u0441\u0435 uWSGI \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043b\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e MINFLT (\u043c\u0438\u043d\u043e\u0440\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/9e4\/571\/972\/9e45719724f045cda5056b00adb2ed61.png\"\/><br \/>  \u0418 \u0441\u043d\u043e\u0432\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043c\u044b \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c <code>Py_Finalize<\/code>. \u041f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438, \u043a\u0440\u043e\u043c\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430, Python \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043e\u0447\u0438\u0441\u0442\u043a\u043e\u0439: \u0442\u0430\u043a\u0438\u0445, \u043a\u0430\u043a \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0442\u0438\u043f\u043e\u0432 \u0438\u043b\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u0418 \u044d\u0442\u043e \u0441\u043d\u043e\u0432\u0430 \u043d\u0430\u043d\u0435\u0441\u043b\u043e \u0432\u0440\u0435\u0434 \u043e\u0431\u0449\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/d60\/6b3\/55e\/d606b355e7b248edaef98c8c1b38e44f.png\"\/><\/p>\n<h2><font color=\"#c75733\">\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043d\u043e\u043c\u0435\u0440 4: \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433 \u043a \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430: \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043e\u0447\u0438\u0441\u0442\u043a\u0438<\/font><\/h2>\n<p>  \u0410 \u0437\u0430\u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u0447\u0442\u043e-\u0442\u043e \u043e\u0447\u0438\u0449\u0430\u0442\u044c? \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u043c\u0440\u0435\u0442, \u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0437\u0430\u043c\u0435\u043d\u0443 \u0434\u043b\u044f \u043d\u0435\u0433\u043e. \u041e \u0447\u0435\u043c \u043d\u0430\u043c \u0441\u0442\u043e\u0438\u0442 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f, \u0442\u0430\u043a \u044d\u0442\u043e \u043e\u0431 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 atexit, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0447\u0438\u0449\u0430\u044e\u0442 \u0437\u0430 \u043d\u0430\u0448\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0410 \u0432\u043e\u0442 \u043e\u0431 \u043e\u0447\u0438\u0441\u0442\u043a\u0430\u0445 Python \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0441\u0442\u043e\u0438\u0442. \u0412\u043e\u0442 \u043a\u0430\u043a \u043c\u044b \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u043d\u0430\u0448 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre><code class=\"python\"># gc.disable() doesn't work, because some random 3rd-party library will # enable it back implicitly. gc.set_threshold(0) # Suicide immediately after other atexit functions finishes. # CPython will do a bunch of cleanups in Py_Finalize which # will again cause Copy-on-Write, including a final GC atexit.register(os._exit, 0)<\/code><\/pre>\n<p>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u0442\u043e\u043c \u0444\u0430\u043a\u0442\u0435, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 atexit \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u0424\u0443\u043d\u043a\u0446\u0438\u044f atexit \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0447\u0438\u0441\u0442\u043a\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>os._exit(0)<\/code>, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. <\/p>\n<p>  \u0418\u0437\u043c\u0435\u043d\u0438\u0432 \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438, \u043c\u044b \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0432\u044b\u043a\u0430\u0442\u0438\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0422\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0432 \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0431\u0449\u0438\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 10%!<\/p>\n<h2><font color=\"#c75733\">\u0412\u0437\u0433\u043b\u044f\u0434 \u043d\u0430\u0437\u0430\u0434<\/font><\/h2>\n<p>  \u041f\u0440\u0438 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u0438\u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0443 \u043d\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u0430\u0440\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043b\u0438 \u043f\u0430\u043c\u044f\u0442\u044c Python \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0447\u0438\u0449\u0430\u0435\u0442\u0441\u044f? (\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 Python \u043d\u0435\u0442 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0441\u0442\u0435\u043a\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043a\u0443\u0447\u0435) <\/p>\n<p>  \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 Python \u2013 \u044d\u0442\u043e \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a. \u041a\u043e\u0433\u0434\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f (\u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>Py_DECREF<\/code>), Python \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0433 \u043b\u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0443\u043b\u044f. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u0434\u0435\u0430\u043b\u043b\u043e\u043a\u0430\u0442\u043e\u0440 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430 \u2013 \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0442\u044c \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<pre><code class=\"cpp\"> #define Py_DECREF(op)                                   \\     do {                                                \\         if (_Py_DEC_REFTOTAL  _Py_REF_DEBUG_COMMA       \\         --((PyObject*)(op))-&gt;ob_refcnt != 0)            \\             _Py_CHECK_REFCNT(op)                        \\         else                                            \\         _Py_Dealloc((PyObject *)(op));                  \\     } while (0)<\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#c75733\">\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u044b\u0438\u0433\u0440\u044b\u0448<\/font><\/h2>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438?<\/p>\n<p>  \u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430 \u0434\u0430\u0435\u0442 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u0432\u044b\u0438\u0433\u0440\u044b\u0448:<\/p>\n<ul>\n<li>\u041c\u044b \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u043b\u0438 \u043f\u043e\u0447\u0442\u0438 8 \u0413\u0411 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u0441\u043c\u043e\u0433\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0430\u043c\u044f\u0442\u0438, \u0438\u043b\u0438 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0426\u041f;<\/li>\n<li>\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0426\u041f \u0442\u0430\u043a\u0436\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0437\u0430 \u043e\u0434\u0438\u043d \u0442\u0430\u043a\u0442 (IPC) \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u043d\u0430 10%.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"bash\"># perf stat -a -e cache-misses,cache-references -- sleep 10  Performance counter stats for 'system wide':        268,195,790      cache-misses              #   12.240 % of all cache refs     [100.00%]      2,191,115,722      cache-references       10.019172636 seconds time elapsed<\/code><\/pre>\n<p>  \u0421 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u043e\u043c \u043c\u0443\u0441\u043e\u0440\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a \u043a\u044d\u0448-\u043f\u0430\u043c\u044f\u0442\u0438 (cache-miss rate) \u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0430 2\u20133%, \u0447\u0442\u043e \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 10%-\u043d\u043e\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f IPC. \u041a\u044d\u0448-\u043f\u0440\u043e\u043c\u0430\u0445\u0438 \u0434\u043e\u0440\u043e\u0433\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0442\u043e\u0440\u043c\u043e\u0437\u044f\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0439 \u0432 \u043a\u044d\u0448 \u0426\u041f \u043c\u043e\u0436\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c IPC. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 (CoW), \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u044d\u0448-\u043b\u0438\u043d\u0438\u0439 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 (\u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445) \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0430\u0434\u0440\u0435\u0441 \u0432 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044e \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0439 \u0432 \u043a\u044d\u0448.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u043d\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a, \u043a\u0430\u043a \u043c\u044b \u0434\u0443\u043c\u0430\u0435\u043c, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041f\u043e\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0439\u0442\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0443\u0434\u0438\u0432\u043b\u044f\u0439\u0442\u0435\u0441\u044c \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435!<\/p>\n<blockquote>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e, \u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0435 \u043a \u043d\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c? \ud83d\ude42<\/b><\/p>\n<div class=\"spoiler_text\"><a href=\"http:\/\/wunderfund.io\"><b>wunderfund.io<\/b><\/a> \u2014 \u043c\u043e\u043b\u043e\u0434\u043e\u0439 \u0444\u043e\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/en.wikipedia.org\/wiki\/High-frequency_trading\">\u0432\u044b\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0439 \u0430\u043b\u0433\u043e\u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0435\u0439<\/a>. \u0412\u044b\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u0430\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u044f \u2014 \u044d\u0442\u043e \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0435 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u0432 \u0432\u0441\u0435\u0433\u043e \u043c\u0438\u0440\u0430. \u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0432\u0448\u0438\u0441\u044c \u043a \u043d\u0430\u043c, \u0432\u044b \u0441\u0442\u0430\u043d\u0435\u0442\u0435 \u0447\u0430\u0441\u0442\u044c\u044e \u044d\u0442\u043e\u0439 \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0445\u0432\u0430\u0442\u043a\u0438.<\/p>\n<p>  \u041c\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 low latency \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0434\u043b\u044f \u0443\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432. \u0413\u0438\u0431\u043a\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u0438 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0431\u044e\u0440\u043e\u043a\u0440\u0430\u0442\u0438\u0438, \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0438 \u0432\u043e\u043f\u043b\u043e\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u0436\u0438\u0437\u043d\u044c.<\/p>\n<p>  \u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u043a \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435: <a href=\"http:\/\/wunderfund.io\">wunderfund.io<\/a><\/div>\n<\/div>\n<\/blockquote>\n<p> \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:\/\/habrahabr.ru\/post\/328404\/\"> https:\/\/habrahabr.ru\/post\/328404\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0432 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430 Python (GC), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044f \u0438 \u0443\u0434\u0430\u043b\u044f\u044f \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, Instagram \u0441\u0442\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 10% \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u0414\u0430-\u0434\u0430, \u0432\u044b \u043d\u0435 \u043e\u0441\u043b\u044b\u0448\u0430\u043b\u0438\u0441\u044c! \u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0432 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u044d\u0448\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u0425\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u0422\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0441\u0442\u0435\u0433\u043d\u0438\u0442\u0435 \u0440\u0435\u043c\u043d\u0438!<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/web\/50a\/374\/689\/50a37468992b4e4d80332d563481d537.jpg\"\/>  <\/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-286358","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286358","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=286358"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286358\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=286358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=286358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=286358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}