{"id":272925,"date":"2016-01-26T15:22:07","date_gmt":"2016-01-26T12:22:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=272925"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=272925","title":{"rendered":"\u0410\u043c\u043d\u0435\u0437\u0438\u044f FreeBSD"},"content":{"rendered":"<p>       \u042f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043b \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u043e FreeBSD. \u0418\u0437 \u0432\u0441\u0435\u0433\u043e \u043c\u043d\u043e\u0433\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u043f\u043e\u043c\u043d\u0438\u043b\u043e\u0441\u044c, \u043b\u0438\u0448\u044c<\/p>\n<blockquote><p>An urban myth has circulated for years that Linux did a better job avoiding swapouts than FreeBSD, but this in fact is not true. What was actually occurring was that FreeBSD was proactively paging out unused pages in order to make room for more disk cache while Linux was keeping unused pages in core and leaving less memory available for cache and process pages. <\/p><\/blockquote>\n<p>  <img decoding=\"async\" align=\"right\" width=\"50%\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/20b\/e23\/149\/20be2314990f8cdf3009281f2911880d.png\"\/><br \/>  \u041d\u0443 \u043b\u0443\u0447\u0448\u0435 \u0447\u0435\u043c Linux, \u0434\u0430 \u0438 \u043f\u0443\u0441\u0442\u044c. \u042f \u043d\u0435 \u043f\u0440\u043e\u0442\u0438\u0432. \u041d\u043e \u0445\u0443\u0436\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0435\u043f\u043e\u043d\u0438\u043c\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u043d\u0435\u044f \u0443\u0431\u0438\u0432\u0430\u043b\u0430 <i>Inactive<\/i> \u043f\u0430\u043c\u044f\u0442\u044c. \u0427\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u00ab\u044d\u0442\u043e\u00bb \u0431\u0435\u0437\u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c? \u0421\u0447\u0438\u0442\u0430\u0442\u044c \u043b\u0438 \u044d\u0442\u0443 \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c?<br \/>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0447\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u043e\u0432.<br \/>  <a name=\"habracut\"><\/a><br \/>  FAQ FreeBSD \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0447\u0442\u043e  <\/p>\n<blockquote><p>16.2.<\/p>\n<p>  Why does top show very little free memory even when I have very few programs running?<\/p>\n<p>  The simple answer is that free memory is wasted memory. Any memory that programs do not actively allocate is used within the FreeBSD kernel as disk cache. The values shown by top(1) labeled as Inact, Cache, and Buf are all cached data at different aging levels. This cached data means the system does not have to access a slow disk again for data it has accessed recently, thus increasing overall performance. In general, a low value shown for Free memory in top(1) is good, provided it is not very low.<\/p><\/blockquote>\n<p>  \u0425\u043e\u0440\u043e\u0448\u043e, \u043f\u0443\u0441\u0442\u044c \u044d\u0442\u043e \u043a\u0435\u0448 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0443 <i>Inact<\/i> \u043f\u0430\u043c\u044f\u0442\u044c \u0432 <i>Cache<\/i>? \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f (\u043a\u0430\u043a \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u0443\u043c\u0447\u0430\u043d\u0435) \u0438 \u043f\u0443\u0441\u0442\u044c \u043d\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0430 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443?<\/p>\n<p>  \u041f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u044d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0443\u0442\u0451\u043c. \u0418\u043c\u0435\u0435\u043c:  <\/p>\n<pre><code class=\"bash\"># top -b 0 last pid:  1019;  load averages:  0.21,  0.45,  0.24  up 0+00:03:33    14:26:30 28 processes:  1 running, 27 sleeping  Mem: 18M Active, 17M Inact, 130M Wired, 24M Buf, 3756M Free Swap: 3852M Total, 3852M Free <\/code><\/pre>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u044f \u043f\u0430\u043c\u044f\u0442\u044c Free \u0438 \u0441\u0432\u043e\u043f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0432\u043e\u0431\u043e\u0434\u0435\u043d.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c tmpfs \u0440\u0430\u0437\u0434\u0435\u043b.<\/p>\n<pre><code class=\"bash\"># mkdir \/tmp\/gb # mount -t tmpfs -o mode=01777,size=3221225472 tmpfs \/tmp\/gb # df -h | egrep &quot;(Filesystem|tmpfs)&quot; Filesystem     Size    Used   Avail Capacity  Mounted on tmpfs          3.0G    4.0K    3.0G     0%    \/tmp\/gb <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c  <\/p>\n<pre><code class=\"bash\"># top -b 0 last pid:  1028;  load averages:  0.09,  0.19,  0.17  up 0+00:09:30    14:32:27 28 processes:  1 running, 27 sleeping  Mem: 18M Active, 17M Inact, 130M Wired, 24M Buf, 3756M Free Swap: 3852M Total, 3852M Free <\/code><\/pre>\n<p>  \u0421\u043e\u0433\u043b\u0430\u0441\u0435\u043d, \u0440\u0430\u0437 \u0440\u0430\u0437\u0434\u0435\u043b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\/\u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d, \u043d\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u0435\u043d, \u0442\u043e \u043d\u0435\u0437\u0430\u0447\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0435\u043c\u0443 \u043f\u0430\u043c\u044f\u0442\u044c.<br \/>  \u041f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u0444\u0430\u0439\u043b.  <\/p>\n<pre><code class=\"bash\"># dd if=\/dev\/urandom of=\/tmp\/gb\/file.txt bs=1M count=3k 3072+0 records in 3071+0 records out 3220176896 bytes transferred in 53.334672 secs (60376801 bytes\/sec) # df -h | egrep &quot;(Filesystem|tmpfs)&quot; Filesystem     Size    Used   Avail Capacity  Mounted on tmpfs          3.0G    3.0G    1.0M   100%    \/tmp\/gb <\/code><\/pre>\n<p>  3 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430\u043d\u044f\u0442\u043e, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c  <\/p>\n<pre><code class=\"bash\"> # top -b 0 last pid:  1040;  load averages:  0.19,  0.26,  0.20  up 0+00:16:40    14:39:37 28 processes:  1 running, 27 sleeping  Mem: 18M Active, 3088M Inact, 137M Wired, 24M Buf, 677M Free Swap: 3852M Total, 3852M Free <\/code><\/pre>\n<p>  \u043e\u043d\u0438 \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f <i>Inact<\/i>\u041d\u043e \u0440\u0430\u0437 \u043e\u043d\u0430 \u043d\u0435 Active, \u0442\u043e \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0435\u0451 \u0437\u0430\u0434\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u041d\u0430\u0431\u0440\u043e\u0441\u0430\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u00abHello, world!\u00bb \u0434\u043b\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0435\u0451 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f:  <\/p>\n<pre><code class=\"cpp\">#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;unistd.h&gt; #include &lt;string.h&gt; int main (int argc, char *argv[]) {         int i;         char *buffer[64];         long lSize = 1024*1024*1024;         int iMB = argc &lt; 2 ? 1 : atoi(argv[1]);         printf(&quot;iMB:\\t%d\\n&quot;, iMB);          for(i=0; i &lt; iMB; i++)         {                 buffer[i] = (char*) malloc (lSize);                 if(buffer[i] != NULL)                 {                         printf(&quot;Alloc: %d\\n&quot;, i);                         memset(buffer[i], 127, lSize);                 } else printf(&quot;Error!\\n&quot;);                 sleep(1);         }         sleep(10);         for(i=0; i &lt; iMB; i++)         {                 printf(&quot;Free: %d\\n&quot;, i);                 free (buffer[i]);         }         return 0; } <\/code><\/pre>\n<pre><code class=\"bash\"># time .\/a.out 3 iMB:    3 Alloc: 0 Alloc: 1 Alloc: 2 Free: 0 Free: 1 Free: 2 0.915u 1.475s 1:00.16 3.9%      5+168k 0+0io 0pf+0w <\/code><\/pre>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0434\u043e\u043b\u0433\u043e? \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043d\u0430\u0448 tmpfs \u044f\u043a\u043e\u0431\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0432 Inactive \u0432\u044b\u0434\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0441\u044f \u0432 \u0441\u0432\u043e\u043f.<\/p>\n<p>  \u0414\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0440\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 (\u043c\u043e\u043c\u0435\u043d\u0442 <i>\u00absleep(10);\u00bb<\/i>) \u0432\u0438\u0434\u0438\u043c:  <\/p>\n<pre><code class=\"bash\"># top -b 0 last pid:  1128;  load averages:  0.02,  0.11,  0.14  up 0+00:28:34    14:51:31 37 processes:  1 running, 36 sleeping  Mem: 3106M Active, 621M Inact, 155M Wired, 26M Cache, 27M Buf, 14M Free Swap: 3852M Total, 2502M Used, 1350M Free, 64% Inuse <\/code><\/pre>\n<p>  \u041d\u043e \u0445\u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u041f\u043e\u0441\u043b\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c:  <\/p>\n<pre><code class=\"bash\"># top -b 0 last pid:  1129;  load averages:  0.09,  0.12,  0.15  up 0+00:28:48    14:51:45 36 processes:  1 running, 35 sleeping  Mem: 33M Active, 621M Inact, 145M Wired, 26M Cache, 27M Buf, 3095M Free Swap: 3852M Total, 2502M Used, 1350M Free, 64% Inuse <\/code><\/pre>\n<p>  \u0441\u0432\u043e\u043f \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d.<br \/>  \u041e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0444\u0430\u0439\u043b\u0443 \u0432\u043d\u043e\u0432\u044c \u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u043f\u0430\u043c\u044f\u0442\u044c \u0432 <i>Inact<\/i>  <\/p>\n<pre><code class=\"bash\"># time dd of=\/dev\/zero if=\/tmp\/gb\/file.txt bs=1M count=3k 3071+0 records in 3071+0 records out 3220176896 bytes transferred in 40.265654 secs (79973292 bytes\/sec) 0.008u 3.796s 0:40.26 9.4%      22+154k 0+0io 0pf+0w # time dd of=\/dev\/zero if=\/tmp\/gb\/file.txt bs=1M count=3k 3071+0 records in 3071+0 records out 3220176896 bytes transferred in 1.242623 secs (2591434941 bytes\/sec) 0.000u 1.241s 0:01.24 100.0%    25+173k 0+0io 0pf+0w # top -b 0 last pid:  1144;  load averages:  0.09,  0.12,  0.14  up 0+00:36:22    14:59:19 36 processes:  1 running, 35 sleeping  Mem: 29M Active, 3077M Inact, 146M Wired, 4K Cache, 27M Buf, 669M Free Swap: 3852M Total, 2502M Used, 1350M Free, 64% Inuse <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u0441\u0442\u0430\u043b\u0441\u044f <i>Swap: 2502M Used<\/i><\/p>\n<p>  \u041d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0438 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u043f\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0438 \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u0435\u0451 \u043a\u0430\u043a <i>Inact<\/i>. \u0427\u0442\u043e \u0436\u0435 \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u0441\u0432\u043e\u043f\u0430? \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 <i>Active<\/i>.<br \/>  \u0423\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0432\u043e\u043f, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c 3Gb \u0440\u0430\u0437\u0434\u0435\u043b tmpfs \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0435\u0433\u043e.  <\/p>\n<pre><code class=\"bash\"># top -b 0 last pid:  1013;  load averages:  0.58,  0.53,  0.29  up 0+00:05:03    15:11:46 34 processes:  1 running, 33 sleeping  Mem: 21M Active, 3089M Inact, 138M Wired, 24M Buf, 673M Free Swap: <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0441\u043e\u0432\u0435\u0441\u0442\u0438 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f \u0447\u0442\u043e top \u043d\u0435 \u0432\u0440\u0451\u0442:  <\/p>\n<pre><code class=\"bash\"># expr `sysctl -n vm.stats.vm.v_inactive_count` \\* `sysctl -n vm.stats.vm.v_page_size` 3239620608 <\/code><\/pre>\n<p>  \u0418 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0432\u043e\u043f\u0430 \u043d\u0430\u0448\u0430 \u0437\u0430\u043d\u044f\u0442\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e \u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u0430\u2026 \u0420\u0430\u0437 \u043e\u043d\u0430 \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0435\u0451 \u0432\u043d\u043e\u0432\u044c \u0437\u0430\u043d\u044f\u0442\u044c \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.  <\/p>\n<pre><code class=\"bash\"># .\/a.out 3 iMB:    3 Alloc: 0 Killed <\/code><\/pre>\n<p>  \u0427.\u0442.\u0434. \u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446:  <\/p>\n<pre><code class=\"bash\"># top -b 0 last pid:  1026;  load averages:  0.15,  0.22,  0.21  up 0+00:11:37    15:18:20 34 processes:  1 running, 33 sleeping  Mem: 3102M Active, 1524K Inact, 138M Wired, 200K Cache, 24M Buf, 679M Free Swap:  # expr `sysctl -n vm.stats.vm.v_inactive_count` \\* `sysctl -n vm.stats.vm.v_page_size` 1720320 <\/code><\/pre>\n<div class=\"clear\"><\/div>\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\/275917\/\"> https:\/\/habrahabr.ru\/post\/275917\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u042f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043b \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u043e FreeBSD. \u0418\u0437 \u0432\u0441\u0435\u0433\u043e \u043c\u043d\u043e\u0433\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u043f\u043e\u043c\u043d\u0438\u043b\u043e\u0441\u044c, \u043b\u0438\u0448\u044c<\/p>\n<blockquote><p>An urban myth has circulated for years that Linux did a better job avoiding swapouts than FreeBSD, but this in fact is not true. What was actually occurring was that FreeBSD was proactively paging out unused pages in order to make room for more disk cache while Linux was keeping unused pages in core and leaving less memory available for cache and process pages. <\/p><\/blockquote>\n<p>  <img decoding=\"async\" align=\"right\" width=\"50%\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/20b\/e23\/149\/20be2314990f8cdf3009281f2911880d.png\"\/><br \/>  \u041d\u0443 \u043b\u0443\u0447\u0448\u0435 \u0447\u0435\u043c Linux, \u0434\u0430 \u0438 \u043f\u0443\u0441\u0442\u044c. \u042f \u043d\u0435 \u043f\u0440\u043e\u0442\u0438\u0432. \u041d\u043e \u0445\u0443\u0436\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0435\u043f\u043e\u043d\u0438\u043c\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u043d\u0435\u044f \u0443\u0431\u0438\u0432\u0430\u043b\u0430 <i>Inactive<\/i> \u043f\u0430\u043c\u044f\u0442\u044c. \u0427\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u00ab\u044d\u0442\u043e\u00bb \u0431\u0435\u0437\u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c? \u0421\u0447\u0438\u0442\u0430\u0442\u044c \u043b\u0438 \u044d\u0442\u0443 \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c?<br \/>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0447\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u043e\u0432.  <\/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-272925","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/272925","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=272925"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/272925\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=272925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=272925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=272925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}