I have 8 GB RAM and a 8 GB swap partition and I set vm.swappiness to 90 in /etc/sysctl.conf (and verified that it's used with the sysctl command at runtime). The system uses 50 % of RAM and 40 % of swap and this situation is approximately the same after running sudo swapoff -a &amp;&amp; sudo swapon -a and a delay of minutes. Also I see that swapping of ca. 100 MB occurs regularily at runtime.  I don't understand why the memory isn't filled up to 90 % as suggested by vm.swappiness.  I experienced with issue with Linux 4.4.0-22 and 4.5.7 on Ubuntu 16.04.  $ cat /proc/meminfo  MemTotal:        8030020 kB MemFree:          220724 kB MemAvailable:    4418060 kB Buffers:           86456 kB Cached:          4090160 kB SwapCached:       184660 kB Active:          3779408 kB Inactive:        2730596 kB Active(anon):    1736480 kB Inactive(anon):   955376 kB Active(file):    2042928 kB Inactive(file):  1775220 kB Unevictable:       62848 kB Mlocked:           62848 kB SwapTotal:       8462332 kB SwapFree:        5576576 kB Dirty:             40332 kB Writeback:             0 kB AnonPages:       2312568 kB Mapped:           315084 kB Shmem:            351016 kB Slab:            1039608 kB SReclaimable:     937796 kB SUnreclaim:       101812 kB KernelStack:       15744 kB PageTables:        53896 kB NFS_Unstable:          0 kB Bounce:                0 kB WritebackTmp:          0 kB CommitLimit:    12477340 kB Committed_AS:   10436316 kB VmallocTotal:   34359738367 kB VmallocUsed:           0 kB VmallocChunk:          0 kB HardwareCorrupted:     0 kB AnonHugePages:    448512 kB CmaTotal:              0 kB CmaFree:               0 kB HugePages_Total:       0 HugePages_Free:        0 HugePages_Rsvd:        0 HugePages_Surp:        0 Hugepagesize:       2048 kB DirectMap4k:      369540 kB DirectMap2M:     7874560 kB
I need a step-by-step, simple and easy way to configure swappiness.
How to do joins in LINQ on multiple fields in single join What fallacy dismisses a conclusion because supporters give invalid arguments for it? Conditional expectation on more than one sigma-algebra Stack Exchange app iPhone X optimization The Stack Exchange app doesn’t look very good on Apple’s brand new flagship phone yet.    Also the app can’t identify the device model either. (Says Unknown (iPhone 10,3))   App Version: 1.6.6.2 Device: iPhone X (iPhone10,3) OS Version: Version 11.1 (Build 15B93) Android Debugging, how? Switch statement fall-through...should it be allowed? I'm batch processing a folder of image to a uniform width with GraphicsMagick (though I assume the same would apply to ImageMagick):  $ gm convert -resize 1000x in.jpg out.jpg   But when I inspect some of the images, I get 999px instead of 1000px.  $ gm identify -verbose out.jpg  ==&gt; Image: out.jpg ==&gt; Format: JPEG (Joint Photographic Experts Group JFIF format ==&gt;   Geometry: 999x591   Is there a way to enforce the right width? I assume it's doing some estimation to preserve aspect ratios. I have a question that bothers me after reading a part of the big book of rules :).  It's about the rule 717, illegal actions.     717.1. If a player realizes that he or she can’t legally take an action after starting to do so, the entire action is reversed and any payments already made are canceled. No abilities trigger and no effects apply as a result of an undone action. If the action was casting a spell, the spell returns to the zone it came from. The player may also reverse any legal mana abilities activated while making the illegal play, unless mana from them or from any triggered mana abilities they triggered was spent on another mana ability that wasn’t reversed. Players may not reverse actions that moved cards to a library, moved cards from a library to any zone other than the stack, or caused a library to be shuffled.   For example, player A plays a .     As an additional cost to cast Goblin Grenade, sacrifice a Goblin.   Goblin Grenade deals 5 damage to target creature or player.   It goes on the stack. Player B gains priority and casts a  on the only goblin of Player A.     Destroy target nonartifact, nonblack creature. It can't be regenerated.   The terror goes on the stack. Then both players agree to resolve the stack. The terror kills the last goblin standing and then the Goblin Grenade can't be cast because of the additional cost which can't be paid. So in my opinion that leaves two possibilities:   The Goblin Grenade returns to the zone it was previously from (the hand of Player A) The Goblin Grenade becomes illegal and gets countered, so it goes to the graveyard   Based on rule 717 I think it goes back to the hand but I'm not quite sure. :) Find three real orthogonal matrices of order $3$ having all integer entries.   I have no idea to solve the problem. I don't know how to start. If $A$ be such matrix then $AA^T=A^TA=I_3$. Please help me. Basically I have a setup like the following:  Array (  [0] =&gt; Array ( [0] =&gt; stdClass Object ( [nid] =&gt; 1 [title] =&gt; title1 [uid] =&gt; 1 [parent] =&gt; 0 [weight] =&gt; -15 [name] =&gt; name1 [value] =&gt; 0 )                [1] =&gt; stdClass Object ( [nid] =&gt; 2 [title] =&gt; title2 [uid] =&gt; 1 [parent] =&gt; 0 [weight] =&gt; -7 [name] =&gt; name2 [value] =&gt; 100 )                [2] =&gt; stdClass Object ( [nid] =&gt; 3 [title] =&gt; title3 [uid] =&gt; 2 [parent] =&gt; 0 [weight] =&gt; -1 [name] =&gt; name3 [value] =&gt; 0 )                [3] =&gt; stdClass Object ( [nid] =&gt; 4 [title] =&gt; title4 [uid] =&gt; 2 [parent] =&gt; 0 [weight] =&gt; 1 [name] =&gt; name4 [value] =&gt; 80 )               )   )   What I need is a way to sort all the arrays inside the parent array by the [value] key in the Object. I've been trying for about 2 days now with usort and different methods but I just can't seem to get my head around it. The [value] key will range anywhere from 0 to 100 and I need all of the arrays sorted in decreasing order (IE: 100 down to 0). Javascript function only works if there's an alert Scaling problem with fillbetween in pgfplots A cyclic group is a group that is generated by a single element.  That means that there exists an element $g$, say, such that every other element of the group can be written as a power of $g$.  This element $g$ is the generator of the group.  Is that a correct explanation for what a cyclic group and a generator are? How can we find the generator of a cyclic group and how can we say how many generators should there be? Using Gimp to batch convert images to another format in Windows As implied by the title, does anybody know how to use the gimp-console-[version].exe program to batch convert images between formats (with default settings) in Windows ? Disabling OBSOLETE error in C# Why does $\lim_{n\to\infty} z_n=A$ imply $\lim_{n\to\infty}\frac{1}{n}(z_1+\cdots+z_n)=A$? I'm self-studying a bit of complex analysis, and I'm attempting to figure out the following.   Suppose $\lim_{n\to\infty}z_n=A$. How can I show that $$ \lim_{n\to\infty}\frac{1}{n}(z_1+\cdots+z_n)=A. $$  Is there a clever way to write the limit to make it more approachable? Thank you. How can I import a .c4d static model (Cinema 4d) on Blender? Is there any plugin could help me? I didn't notice anything on Internet. How to properly render smoke on a transparent background? From  (emphasis mine):     Neutron degeneracy is a stellar application of the Pauli Exclusion Principle, as is electron degeneracy. No two neutrons can occupy identical states, even under the pressure of a collapsing star of several solar masses. For stellar masses less than about 1.44 solar masses (the Chandrasekhar limit), the energy from the gravitational collapse is not sufficient to produce the neutrons of a neutron star, so the collapse is halted by electron degeneracy to form white dwarfs. Above 1.44 solar masses, enough energy is available from the gravitational collapse to force the combination of electrons and protons to form neutrons. As the star contracts further, all the lowest neutron energy levels are filled and the neutrons are forced into higher and higher energy levels, filling the lowest unoccupied energy levels. This creates an effective pressure which prevents further gravitational collapse, forming a neutron star. However, for masses greater than 2 to 3 solar masses, even neutron degeneracy can't prevent further collapse and it continues toward the black hole state.   How then, can they collapse, without violating the Pauli Exclusion Principle? At a certain point does it no longer apply? Why is the Night's Watch so depleted at the start of ASOIAF? At the start of AGOT, the total number of the Night's Watch is said to be less than a thousand. During Aegon's conquest, the Watch numbered ten thousand men. Out of the nineteen castles on the wall, only three are manned today. Castle black itself is once said to have housed 5000.   This rapid deterioration doesn't make sense to me from a world-building perspective. The NW have continued to maintain themselves pretty well for nigh on 8000 years (if the tales can be believed that is, Sam Tarly finds no written evidence of Lord Commanders earlier than #673, which suggests that 8000 years may be an inflated 'legendary' number).   Whereas in the real world, one of the oldest and most venerable institutions, the Catholic Church, has been around for less than 2000 years and has been administered by ~200 popes. The Night's Watch has had a few rocky years, sure, but for it to maintain itself so well for so long and then deteriorate only in the last 300 years seems strange to me.   The NW has two purposes. The ostensible one of defending against the Others, and the (arguably much more real, at least at the start of AGOT) purpose of serving as a dumping ground for the 'losers' of Westeros. By 'losers', I mean the people on the losing side of various wars and political battles, as well as criminals and n-th sons of noble houses with nothing to inherit.  I am currently reading through Fire and Blood, and was struck by one chapter, where an armed revolt of members of the Faith were defeated by Maegor, and 2000 brothers were forced to take the black. Those sorts of numbers don't exist in the recent histories it seems.   One would expect that after Robert's Rebellion, there would be a surfeit of defeated Targaryen loyalists who were forced to take the black, but apart from a smattering of named characters (including Ser Alliser Thorne), there seem to be hardly any Night's watch recruits from recent wars.  Given the way the Night's watch is continually bolstered by the losers of wars and by criminals and other people who elsewise have nothing going for them, why, at the start of AGOT, is the force so depleted?