Can someone please explain the page-in/page-out in simple terms, why it's good to have 0/0 on them?
Think of your computer memory as paper note books with many pages in each one. In simple terms a computer has two note books - one is the RAM and the other is virtual memory, which is stored on your hard drive. Technically speaking there is a third note book, which is the stupidly fast cache memory on your CPU, but that's beyond the scope of this post.
A typical computer will have 4 gigabytes of RAM and about 500 gigabytes hard drive. You can already see that you have a lot more virtual RAM, unless your hard drive is full (which is very bad by the way). RAM is a lot faster to access than a hard drive. It does not matter if you have a solid state drive, which are obviously faster than mechanical hard drives. Typical RAM in computers these days is approximately 20 times faster than the average consumer solid state drive.
Now that we'e covered the background, let's go back to the note books analogy. Your computer, much like you, needs to remember stuff. It does this by writing to the pages in a note book. Each page can store a finite amount of information and, as I said, there are only a finite number of pages (how much RAM you have). The good thing is that these note books have clips, so you can remove or add pages as necessary without tearing or destroying anything. When your computer needs to remember something it first checks if there is a page available in your RAM. If there is, it simply writes that information to the available page. This is called a page in. Things get complicated when your RAM is being used by other applications and system processes and there aren't free pages to use in the RAM note book. This is when the second note book (the virtual memory) needs to be used.
In a nutshell, the operating system checks which pages haven't been used for a while in your RAM note book. This would normally be the pages for an application that's idling in the background or hasn't been used for some time. This page then gets removed from your RAM notebook and placed into your virtual memory notebook (in other words, it's stored on your hard drive) .This is called a page out. This is why page outs are bad. Writing to the hard drive is a very expensive operation and takes a lot longer than writing to the RAM. Once the page out has occurred the new information gets written to the RAM note book, since there is a free page available (page in).
Now, most people would say, "But that means having a low free RAM is bad". It's not true, because operating systems like OSX do things slightly differently. They actually allow the operating system and applications to hold onto the RAM (inactive RAM in activity monitor) for as long as possible. Then, when an application needs more RAM, the inactive pages are assigned to it, and the application's pages that were sitting there previously will be "paged out" to the virtual memory hard drive. This is why you sometimes see slow downs and beach balls when you switch back to an application that's been idling in the background for a while. The worst case is if you're constantly running out of RAM, because you're performing a task on a huge amount of data and the operating system has to try and move pages back and forth from the virtual memory to the RAM. This is when you get to a state of "thrashing".
wikipedia said:
In virtual memory systems, thrashing may be caused by programs or workloads that present insufficient locality of reference: if the working set of a program or a workload cannot be effectively held within physical memory, then constant data swapping, i.e., thrashing, may occur.
Some operating systems (like Windows XP) aggressively try to free RAM from idling applications. Windows 7 is somewhere in between OSX and XP. It tries to use more RAM than previous versions of Windows for caching.