Opened 13 years ago

Closed 13 years ago

#7714 closed bug (fixed)

Total memory usage wrong in user applications

Reported by: leavengood Owned by: anevilyak
Priority: normal Milestone: R1
Component: Kits/Kernel Kit Version: R1/Development
Keywords: memory usage wrong Cc:
Blocked By: Blocking:
Platform: All

Description

As can be seen in the attached screenshot, this is hrev41768, an earlier R1/alpha3 GCC4 RC.

All user applications show the wrong amount for total memory, including the bar in ProcessController, the AboutSystem app, and ActivityMonitor. Going into KDL and invoking the avail commands seems to show the correct usage (about 850 MB while I was compiling Haiku in the screenshot.)

The screenshot shows just jam alone consuming almost 370 MB, yet the total shown in AboutSystem is 161 MB. I know we like to talk about Haiku not using much memory, but let's not just lie about it :)

Attachments (3)

memory_wrong.png (166.0 KB ) - added by leavengood 13 years ago.
Screenshot showing incorrect memory usage
kdl_output_avail_page_stats.txt (1.3 KB ) - added by leavengood 13 years ago.
Output from KDL avail, page_stats and swap commands
slabs.txt (5.0 KB ) - added by leavengood 13 years ago.
Output from KDL slabs command

Download all attachments as: .zip

Change History (6)

by leavengood, 13 years ago

Attachment: memory_wrong.png added

Screenshot showing incorrect memory usage

by leavengood, 13 years ago

Output from KDL avail, page_stats and swap commands

by leavengood, 13 years ago

Attachment: slabs.txt added

Output from KDL slabs command

comment:1 by bonefish, 13 years ago

The problem is in vm_page_get_stats():

info->used_pages = gMappedPagesCount - blockCachePages;

As can be seen in the page_stats output a lot of pages are inactive (i.e. haven't been used for a long time). Those are ignored here. Adding them will probably fix the issue.

comment:2 by anevilyak, 13 years ago

Owner: changed from axeld to anevilyak
Status: newin-progress

in reply to:  1 comment:3 by anevilyak, 13 years ago

Resolution: fixed
Status: in-progressclosed

Replying to bonefish:

As can be seen in the page_stats output a lot of pages are inactive (i.e. haven't been used for a long time). Those are ignored here. Adding them will probably fix the issue.

Done in hrev43168.

Note: See TracTickets for help on using tickets.