I am running docker swarm across two Debian 8 nodes, each with 1GB ram.  I wanted to see how much memory was available to my application process (which will be a Solr server) so I did:  docker-compose run solr bash   In other words, instead of the solr server process I am just running a bash shell, inside a container otherwise identical to the one which will run my server.  If I run top this is what I see:  top - 16:23:57 up  6:09,  0 users,  load average: 0.00, 0.01, 0.05 Tasks:   2 total,   1 running,   1 sleeping,   0 stopped,   0 zombie %Cpu(s):  0.0 us,  0.0 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.0 hi,  0.3 si,  0.3 st KiB Mem:   1024468 total,   634016 used,   390452 free,    93124 buffers KiB Swap:        0 total,        0 used,        0 free.   375932 cached Mem    PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND    11 solr      20   0   23640   2704   2320 R  0.3  0.3   0:00.01 top     1 solr      20   0   21940   3540   3044 S  0.0  0.3   0:00.12 bash   Apparently out of 1GB allocated to the container I am using 634MB, even though the only two processes running in the container are top and bash.  How much should I expect normally to be consumed by the OS?  I assume some of this is consumed by the Docker daemon and swarm too, outside the container on the host node.  hmm, I've just read this  ...should I interpret top to mean that, of the 634MB 'used', 375MB of that is just disk cache and is available to my app process?  So I really have 766MB free -  is that right?  The point of all this is so I can start my Solr server process with a realistic memory limit, to make best use of the 1GB node without getting shut down due to out-of-memory error.  UPDATE  Ok this has been marked as duplicate, so it is the 'linux ate my ram' thing. From that page the answer is not to use top but rather:  $ dc run solr bash solr@59cb7fafca0e:/opt/solr-4.10.4$ free -m              total       used       free     shared    buffers     cached Mem:          1000        628        371          8         94        372 -/+ buffers/cache:        161        838 Swap:            0          0          0   ...and from this the 'true' free memory figure is 838MB (which seems to derive from free + buffers + cached)
This is a  about how Unix operating systems report memory usage.   Similar Questions:                    I have production server that is running Debian 6.0.6 Squeeze  #uname -a  Linux debsrv 2.6.32-5-xen-amd64 #1 SMP Sun Sep 23 13:49:30 UTC 2012 x86_64 GNU/Linux   Every day cron executes backup script as root:  #crontab -e  0 5 * * * /root/sites_backup.sh &gt; /dev/null 2&gt;&amp;1   #nano /root/sites_backup.sh  #!/bin/bash str=`date +%Y-%m-%d-%H-%M-%S` tar pzcf /home/backups/sites/mysite-$str.tar.gz /var/sites/mysite/public_html/www mysqldump -u mysite -pmypass mysite | gzip -9 &gt; /home/backups/sites/mysite-$str.sql.gz cd /home/backups/sites/ sha512sum mysite-$str* &gt; /home/backups/sites/mysite-$str.tar.gz.DIGESTS cd ~   Everything works perfectly, but I notice that Munin's memory graph shows increase of cache and buffers after backup.  Then I just download backup files and delete them. After deletion Munin's memory graph returns cache and buffers to the state that was before backup.  Here's Munin graph:  Externally hosted image was a dead link.
Prior to doing some benchmarking work how would one free up the memory (RAM) that the Linux Kernel is consuming for its buffers and cache?    Note that this is mostly useful for benchmarking. Emptying the buffers and cache reduces performance! If you're here because you thought that freeing buffers and cache was a positive thing, go and read . The short story: free memory is unused memory is wasted memory. Is there a difference between Bayesian and Classical sufficiency? The title pretty much says it all. I wonder whether there is any difference in the way Bayesians understand sufficiency vs. the way orthodox statistics understands sufficiency, or are they equivalent?  If there is a difference, what is it? Syntax highlighting with less, trouble with lexer I have installed python-pygments and using it for syntax highlighting with less as described by mankoff  I put a function in my .bashrc  cless () {     pygmentize -f terminal "$1" | less -R }   it is enabling syntax highlighting with less. But when I am going to open a file like /etc/fstab or /etc/apt/apt.conf a error saying  Error: no lexer for filename '/etc/apt/apt.conf' found   I found option to show pygmentize the lexer with -l at this . But what will be the appropriate lexer for such files? and how to use it? I can never figure out whether I should use who and whom. Most people use who for both colloquially, but some people say this is not correct.  What’s the rule for using who and whom correctly? Adding Basemaps from Google or Bing in QGIS Exploiting JavaScript's eval() method Finding the limit of $\left(\frac{n}{n+1}\right)^n$ How can I move my /home directory to another partition if it's already part of the / partition? Is 3+1 spacetime as privileged as is claimed? I've often heard the argument that having 3 spatial dimensions is very special. Such arguments are invariably based on certain assumptions that do not appear to be justifiable at all, at least to me. There is a  on Wikipedia.  For example, a common argument for why >3 dimensions is too many is that the gravitational law cannot result in stable orbital motion. A common argument for &lt;3 dimensions being too few is that one cannot have a gastrointestinal tract, or more generally, a hole that doesn't split an organism into two.  Am I being overly skeptical in thinking that while the force of gravity may not be able to hold objects in stable orbits, there most certainly exist sets of physical laws in higher dimensions which result in formation of stable structures at all scales? It may be utterly different to our universe, but who said a 4D universe must be the same as ours with one extra dimension?  Similarly, isn't it very easy to conceive of a 2D universe in which organisms can feed despite not having any holes, or not falling apart despite having them? For example, being held together by attractive forces, or allowing certain fundamental objects of a universe to interpenetrate, and thus enter a region of the body in which they become utilized. Or, conceive of a universe so incomprehensibly different to ours that feeding is unnecessary, and self-aware structures form through completely different processes.  While I realise that this is sort of a metaphysical question, is 3+1 dimensions really widely acknowledged to be particularly privileged by respected physicists? Best way to find a point on a circle closest to a given point Given a point (pX, pY) and a circle with a known center (cX,cY) and radius (r), what is the shortest amount of code you can come up with to find the point on the circle closest to (pX, pY) ?  I've got some code kind of working but it involves converting the circle to an equation of the form (x - cX)^2 + (y - cY)^2 = r^2 (where r is radius) and using the equation of the line from point (pX, pY) to (cX, cY) to create a quadratic equation to be solved.  Once I iron out the bugs it'll do, but it seems such an inelegant solution. Is there any difference between "offense" and "offence"? "Offense" vs. "offence", which is more correct? If both are correct, are there any differences in shades of meaning and/or usage? Changing affiliation on publication How can I get the Ubuntu shell on Windows 10 to recognize a connected android device? I'm trying to connect adb to my Android device in the Windows 10 Ubuntu shell, but it doesn't seem to be working:    adb does work normally on Windows, so it's not a problem with the phone or the connection.  Do I have to do something like mount the port in the Ubuntu shell?  How?  (The goal is to pass logcat to grep, which would obviously work better in Ubuntu.) Showcase of beautiful typography done in TeX & friends If you were asked to show examples of beautifully typeset documents in TeX &amp; friends, what would you suggest? Preferably documents available online (I'm aware I could go to a bookstore and find many such documents called 'books'). Extra bonus for documents whose LaTeX source is available.  This is not an idle question. Seeing great examples of any craft is both educational and inspiring, let alone explaining why we prefer TeX to Word or other text editors.  For instance, I like how Philipp Lehman's  looks. I don't know enough LaTeX to realize how much customization was done, but the ToC looks polished.  Your nominations, please ... How to set identity_insert to on in SQL Server Wow, the iOS app feed sure showed me an interesting question! I want to read more. Uh, how do I get there? In the iOS app, pulling up a question from the feed gives the standard question view, which provides no means of navigating elsewhere on that site, either to browse or search. This should be changed for feed questions.  For example, I tapped on a highlighted Seasoned Advice question today, and found that I wanted to make a comment pointing to a related question on the site. The best way I could think of finding that post was to leave the app and use my browser. Then I came back with the link to copy-paste in.  Similarly, a question in the feed might be so intriguing that I want to look around for more cool stuff on the site. That requires two taps back and then a search via the "All Sites" menu item.  I'd suggest that questions selected from the feed should get a special header bar (or maybe stuck in between the questions and the answers) that provides a "More posts!" link at least to the site's top view; ideally there would also be a search field that could pop out of it.  Another possibility that would work pretty well, although it's a small tap target on a phone, would be to link the site name that appears under the question title to the site's top view. Continuous bijections and their inverses Are there any theorems characterizing the continuity of the inverses of bijections between certain classes of particular spaces. E.g. it seems to me the inverse of any continuous bijection between connected subsets of $\mathbb{R}$ is continouos. It seems that most counterexamples require highly specific spaces. I'm thinking there might be something along the lines of any continuous bijection between homeomorphic spaces has a continuous inverse. Any of this make sense? When trying to restore a backup to a SQL Server Express 2008 database I got the following error:  Restore failed for Server '...\SQLEXPRESS'.  (Microsoft.SqlServer.SmoExtended) System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.1600.  That version is incompatible with this server, which is running version 10.00.2531.  Either restore the database on a server that supports the backup, or use a backup  that is compatible with this server. (Microsoft.SqlServer.Smo)   Is there a way to get a backup which is compatible with the older (in my case 10.00.2531) version from the newer (in my case 10.50.1600) version of SQL Server Express? Is there an analytic function $f$ on $B(0,1)$ the open ball with radius 1 such that $f(1/n)=e^{-n}$ for $n=2,3,4,...$? Is there an analytic function $f$ on $B(0,1)\subset\mathbb{C}$ such that $f(1/n)=e^{-n}$ for $n=2,3,4,...$? I know the following doesn't work:  Let $g(z)=\exp(-1/z)$. Then, $f=g$ on a sequence with a limit point in $B(0,1)$ and so $f=g$ on $B(0,1)$. Since $g$ is not $\mathbb{C}$-differentiable at $0$, neither is $f$ and so such a function cannot exist.  This is not the solution because you cannot use the identity principle with a non analytic function like $\exp(-1/z)$ is not analytic at $z=0$. Any help using the identity principle another way? How do you implement Coroutines in C++