How to find or calculate a Linux process's page table size and other kernel accounting?

后端 未结 5 1750
没有蜡笔的小新
没有蜡笔的小新 2021-02-02 03:46

How can I find out how big a Linux process\'s page table is, along with any other variable-size process accounting?

5条回答
  •  春和景丽
    2021-02-02 04:07

    You should describe your problem, and not ask about details. If you fork too much (especially with a process which has a large address space) there are all kind of things which go wrong (including out of memory), hitting a pagetable maximum size is IMHO not a realistic problem.

    Thad said, I would also be interested to read a process pagetable share in Linux.

    As a simple rule of thumb you can however asume that each process occopies a share in the pagetable which is equal to its virtual size, for example 6 bytes for each page. So for example if you have a Oracle Database with 8GB SGA and 500 Processes sharing it, each of the process will use 14MB pagetable, which results in 7GB pagetables+8GB SGA. (sample numbers from http://kevinclosson.wordpress.com/2009/07/25/little-things-doth-crabby-make-%E2%80%93-part-ix-sometimes-you-have-to-really-really-want-your-hugepages/)

提交回复
热议问题