• Skip to main content
  • Skip to primary sidebar

Technical Notes Of
Ehi Kioya

Technical Notes Of Ehi Kioya

  • Forums
  • About
  • Contact
MENUMENU
  • Blog Home
  • AWS, Azure, Cloud
  • Backend (Server-Side)
  • Frontend (Client-Side)
  • SharePoint
  • Tools & Resources
    • CM/IN Ruler
    • URL Decoder
    • Text Hasher
    • Word Count
    • IP Lookup
  • Linux & Servers
  • Zero Code Tech
  • WordPress
  • Musings
  • More
    Categories
    • Cloud
    • Server-Side
    • Front-End
    • SharePoint
    • Tools
    • Linux
    • Zero Code
    • WordPress
    • Musings
Home » Backend (Server-Side) » Meaning of Pss in /proc/PID/smaps (and some extra memory info)

Meaning of Pss in /proc/PID/smaps (and some extra memory info)

December 28, 2019 by Ehi Kioya Leave a Comment

If you have ever tried to figure out why Linux is running low on memory, you will agree that the memory usage information provided by the kernel is not exactly easy to understand.

This post will attempt to provide a quick explanation of what Pss means in the /proc/PID/smaps file.

/proc/PID/smaps is an extension based on maps. It shows the memory consumption for each of a process’ mappings. For each mapping, there are a series of lines (see the block below for a sample portion of the smaps file of a random process – I grabbed that from one of my Linux boxes).

PSS stands for Proportional Set Size.

The Pss of a process is a count of the number of pages the process has in memory. But this isn’t a straightforward count. Each page is divided by the number of processes sharing it. So if our process has 1000 pages by itself alone, and another 1000 shared with one other process, the Pss of our process will be 1500.

Here’s how a portion of a typical smaps file may look like. Notice the variables:

562baaa22000-562baae25000 r-xp 00000000 fc:01 2692                       /usr/bin/php-cgi7.2
Size:               4108 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Rss:                3740 kB
Pss:                 225 kB
Shared_Clean:       3740 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:         0 kB
Referenced:         3740 kB
Anonymous:             0 kB
LazyFree:              0 kB
AnonHugePages:         0 kB
ShmemPmdMapped:        0 kB
Shared_Hugetlb:        0 kB
Private_Hugetlb:       0 kB
Swap:                  0 kB
SwapPss:               0 kB
Locked:                0 kB
VmFlags: rd ex mr mw me dw sd

In this case, Pss = 225 kB.

The first line above shows the same information for the mapping as is contained in the /proc/PID/maps file.

The other lines provide a number of extra details including:

  • The mapping size (Size)
  • The proportional share of this mapping that belongs to the process (Pss)
  • The amount of the mapping that currently sits in RAM (Rss)
  • The amount of memory currently marked as referenced or accessed (Referenced)
  • How many dirty and clean private pages are in the mapping (Private_Dirty and Private_Clean respectively). Note: Even if a page is part of the MAP_SHARED mapping, if it has only one pte mapped, is counted as private (not as shared).
  • The amount of memory that does not belong to any file (Anonymous)
  • The amount of would-be-anonymous memory that is used but stored on swap (Swap)

This post is primarily for reference purposes. My explanation is based on some of the information provided at the Linux Kernel Documentation.

Found this article valuable? Want to show your appreciation? Here are some options:

  1. Spread the word! Use these buttons to share this link on your favorite social media sites.
  2. Help me share this on . . .

    • Facebook
    • Twitter
    • LinkedIn
    • Reddit
    • Tumblr
    • Pinterest
    • Pocket
    • Telegram
    • WhatsApp
    • Skype
  3. Sign up to join my audience and receive email notifications when I publish new content.
  4. Contribute by adding a comment using the comments section below.
  5. Follow me on Twitter, LinkedIn, and Facebook.

Related

Filed Under: Backend (Server-Side), Linux & Servers, Zero Code Tech Tagged With: Linux, Memory, Pss

About Ehi Kioya

I am a Toronto-based Software Engineer. I run this website as part hobby and part business.

To share your thoughts or get help with any of my posts, please drop a comment at the appropriate link.

You can contact me using the form on this page. I'm also on Twitter, LinkedIn, and Facebook.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

26,208
Followers
Follow
30,000
Connections
Connect
14,641
Page Fans
Like

POPULAR   FORUM   TOPICS

  • How to find the title of a song without knowing the lyrics
  • Welcome Message
  • How To Change Or Remove The WordPress Login Error Message
  • The Art of Exploratory Data Analysis (Part 1)
  • Getting Started with SQL: A Beginners Guide to Databases
  • Replacing The Default SQLite Database With PostgreSQL In Django
  • 100% Disk Usage In Windows 10 Task Manager – How To Fix
  • Setting up an Ecommerce page: WordPress (WooCommerce) vs Shopify
  • What Is HTTPS? And Why Should You Care?
  • How To Free-up Space On Your Devices Without Losing Your Files
  • Recently   Popular   Posts   &   Pages
  • Actual Size Online Ruler Actual Size Online Ruler
    I created this page to measure your screen resolution and produce an online ruler of actual size. It's powered with JavaScript and HTML5.
  • Allowing Multiple RDP Sessions In Windows 10 Using The RDP Wrapper Library Allowing Multiple RDP Sessions In Windows 10 Using The RDP Wrapper Library
    This article explains how to bypass the single user remote desktop connection restriction on Windows 10 by using the RDP wrapper library.
  • WordPress Password Hash Generator WordPress Password Hash Generator
    With this WordPress Password Hash Generator, you can convert a password to its hash, and then set a new password directly in the database.
  • Forums
  • About
  • Contact

© 2021   ·   Ehi Kioya   ·   All Rights Reserved
Privacy Policy