[SERVER-46024] Collect /proc/vmstat swap statistics in FTDC Created: 06/Feb/20  Updated: 29/Oct/23  Resolved: 18/Mar/20

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: None
Fix Version/s: 4.2.6, 3.6.18, 4.4.0-rc0, 4.0.18, 4.7.0

Type: Improvement Priority: Major - P3
Reporter: Kevin Arhelger Assignee: Mark Benvenuto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4, v4.2, v4.0, v3.6
Sprint: Security 2020-03-23
Participants:

 Description   

FTDC currently collects page faults and disk activity, however determining the status of actual swap activity is difficult from just these metrics.

The addition of pswpin and pswpout should cover this activity.



 Comments   
Comment by Githook User [ 25/Mar/20 ]

Author:

{'email': 'mark.benvenuto@mongodb.com', 'name': 'Mark Benvenuto', 'username': 'markbenvenuto'}

Message: SERVER-46024 Collect /proc/vmstat swap statistics in FTDC

(cherry picked from commit 97e0731610f18576229c322c3a4186202c77c521)
Branch: v4.2
https://github.com/mongodb/mongo/commit/75522da039c1d869fa84800b6770164168c10abc

Comment by Githook User [ 20/Mar/20 ]

Author:

{'name': 'Mark Benvenuto', 'username': 'markbenvenuto', 'email': 'mark.benvenuto@mongodb.com'}

Message: SERVER-46024 Collect /proc/vmstat swap statistics in FTDC

(cherry picked from commit 97e0731610f18576229c322c3a4186202c77c521)
Branch: v3.6
https://github.com/mongodb/mongo/commit/0e6cad944ce21880dce7616677669d089932f7fc

Comment by Githook User [ 19/Mar/20 ]

Author:

{'email': 'mark.benvenuto@mongodb.com', 'name': 'Mark Benvenuto', 'username': 'markbenvenuto'}

Message: SERVER-46024 Collect /proc/vmstat swap statistics in FTDC

(cherry picked from commit 97e0731610f18576229c322c3a4186202c77c521)
Branch: v4.0
https://github.com/mongodb/mongo/commit/997a51ce1592e3f048858b128a525e97f03407ea

Comment by Githook User [ 18/Mar/20 ]

Author:

{'name': 'Mark Benvenuto', 'username': 'markbenvenuto', 'email': 'mark.benvenuto@mongodb.com'}

Message: SERVER-46024 Collect /proc/vmstat swap statistics in FTDC

(cherry picked from commit 97e0731610f18576229c322c3a4186202c77c521)
Branch: v4.4
https://github.com/mongodb/mongo/commit/9d64859de2e271885f448838146d01a6d428431f

Comment by Githook User [ 17/Mar/20 ]

Author:

{'name': 'Mark Benvenuto', 'username': 'markbenvenuto', 'email': 'mark.benvenuto@mongodb.com'}

Message: SERVER-46024 Collect /proc/vmstat swap statistics in FTDC
Branch: master
https://github.com/mongodb/mongo/commit/97e0731610f18576229c322c3a4186202c77c521

Comment by Mark Benvenuto [ 11/Mar/20 ]

Yes, you are correct. The pgmajfault counter faults that require reading from disk and pgfault is all faults (aka "soft" or "minor"). I will add the pgfault counter.

Comment by Bruce Lucas (Inactive) [ 11/Mar/20 ]

Is the difference between pgmajfault and pgfault that the latter includes "soft" or "minor" page faults used to implement on-demand memory allocation? If so this might be interesting because I've at times suspected that a high rate of minor page faults due to allocator commit/decommit churn was responsible for some performance issues.

Comment by Mark Benvenuto [ 11/Mar/20 ]

I would also include nr_mlock.

bruce.lucas, what are your thoughts? In summary, 

  • pswpin
  • pswpout
  • pgmajfault
  • nr_mlock

Are the counters I am planning on including.

 

References

https://elixir.bootlin.com/linux/latest/source/include/linux/vm_event_item.h#L25

https://lists.gt.net/linux/kernel/1131720

Comment by Mark Benvenuto [ 10/Mar/20 ]

Should we also include pgmajfault for major page faults? I could not find any counters that really stand out: pgfault is all page faults which is not interesting.

Generated at Thu Feb 08 05:10:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.