Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1. What is the metric used in this output? The man page says the metric
is 'pages' but what is the page size? How can i get this info?
2. Does The value in pgpgin/s contain all type of paging activity?
I mean file paging, application paging , anonymus paging. (In sun
solaris , vmstat -p shows detailed paging information )
3. I use directio so basically what i know is no page cache is used for
data pages. Is this output a proof that files are cached although i use
(1) On x86 hardware, the page size is 4096 bytes (4 KB).
(2) AFAIK Yes, it measures all transfers to and from the swap device.
(3) I'm not sure exactly what direct I/O is, but even if you use stuff like DMA the kernel will still cache quite a lot of information. Is the system heavily loaded when this happens?
Vmstat is available for Linux -- you might want to take a look with it. Iostat too, maybe.
this is a very large and complex issue but since we usually get Windows does this or Windows does that and this is different i will try to answer.
i don't know about solaris but in Linux all memory is virtual.
even if you are using ZONE_ DMA it's still virtual i think.
Linux uses three level paging and i think where only two are needed two of them are the same ?
not sure about that. intel uses two i think.
basically all user pages are part of either page cache/disk cache or swap cache
that is all memory is in one cache or the other.
cache is of course nothing more than a list of pointers to struct page objects i think
anonymus data paging is in the swap cache and swap cue.
if something is paged from your disk in goes in page cache and i know of no system that tries to not hold disk data in memory. If your disk reads and writes are DMA the system is still not going to try to use the disk like it's a memory page. You just don't have an i/o buffer taking up space.
and of course the system only pages what it needs at the time and leaves the rest on the disk.
there is no application paging i don't think again just code mmapped into disk cache.
shared libs can also use pages for non-shared non-constant static data and shared library address translation tables
there is a linked list in every page contaning pointers to the page table entries of every process currently mapping that page.
as btmiller said Typically, the memory manager deals with memory in 4 KB pages on x86 systems.
but Linux can also deal with large 4 MB pages , or 2MB on systems with physical address extension (PAE) turned on.
This can reduce overhead and speed up translation lookaside buffer which is cache for the page tables.
also it's important to know the kernel for instance when it's asked for a large page size 4MB mapping will just allocate fragments of pages as a large group i think.
so basically yes everything that ever makes its way into or out of RAM is in pages and is cached
and each process has access to its own entire 4MB or 3MB + 1MB kernel space
First of all , let me give you more information aboout my system. This is not intel 32 , this is
itanium 64 . By using getpagesize() i have found that page size is 16kb.
I have 8gb. ram , 4 cpus , and oracle 9.2.0.5 rac ( parallel server - so i have 2 servers )
I use emc disk array , raid 10 , 2TB. data , and 1 hba (fibre channel)
The file system which data files reside is OCFS ( oracle clustered file system) which i told by oracle that uses direct io .
You are right that all memory is virtual both in linux and solaris.
When i strace the oracle executables i see it uses pread calls for io . My concern is , if oracle executable does not use direct io then the kernel uses virtual memory system in order to cache the data ( i mean inside the page cache - not buffer cache which only caches inode information both on solaris and linux) , at the same time the data is cached inside the oracle executables private area so , doesnt this mean double buffering and wasting of memory?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.