Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Log ru_maxrss from getrusage for PVF workers #6317

Closed
mrcnski opened this issue Nov 20, 2022 · 4 comments · Fixed by #6565
Closed

Log ru_maxrss from getrusage for PVF workers #6317

mrcnski opened this issue Nov 20, 2022 · 4 comments · Fixed by #6565
Assignees
Labels
J0-enhancement An additional feature request. S1-implement PR/Issue is in the implementation stage T4-parachains_engineering This PR/Issue is related to Parachains performance, stability, maintenance.

Comments

@mrcnski
Copy link
Contributor

mrcnski commented Nov 20, 2022

ISSUE

Overview

Original comment by @eskimor:

ru_maxrss ... could be interesting. By checking the amount of memory used, we might get a better heuristic on whether something is likely valid, but the machine has issues or likely invalid (excessive RAM usage). Don't have a clear strategy, seems very brittle at first thought.

We decided that just logging it for now would be nice.

Note: The cpu_time crate also has support for Windows. Not sure if Windows has something like ru_maxrss. Do we care?

Related Links

Follow-up from #6282.

@eskimor eskimor added the T4-parachains_engineering This PR/Issue is related to Parachains performance, stability, maintenance. label Dec 5, 2022
@eskimor eskimor moved this to To do in Parachains-core Dec 5, 2022
@mrcnski
Copy link
Contributor Author

mrcnski commented Dec 27, 2022

Don't think either Windows nor MacOS supports this; see here. We might be able to get similar data with tikv-jemalloc-ctl, as described in paritytech/polkadot-sdk#745.

@bkchr
Copy link
Member

bkchr commented Dec 27, 2022

We don't really support macos nor windows officially for validators. We merge fixes and ensure that it compiles for these targets, but if it not supporting all features it should be okay.

@vstakhov
Copy link
Contributor

vstakhov commented Dec 27, 2022

struct rusage is not really defined by POSIX standard, so Darwin and Windows are free to do whatever they like here, I'm afraid. However, at least in the recent OSX versions, struct rusage returned from getrusage call has the field:

 long ru_maxrss;          /* max resident set size */

@mrcnski mrcnski added J0-enhancement An additional feature request. S1-implement PR/Issue is in the implementation stage labels Jan 24, 2023
@mrcnski
Copy link
Contributor Author

mrcnski commented Feb 2, 2023

Don't think either Windows nor MacOS supports this; see here.

Actually, I tried it and it seems like MacOS does support max_rss (though not Windows). I'm not really sure what I was looking at in that link TBH. 😅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request. S1-implement PR/Issue is in the implementation stage T4-parachains_engineering This PR/Issue is related to Parachains performance, stability, maintenance.
Development

Successfully merging a pull request may close this issue.

4 participants