Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory profiling support in daemon #3247

Merged
merged 14 commits into from Aug 21, 2019

Conversation

@psteckler
Copy link
Contributor

commented Aug 20, 2019

Use the +statistical-memprof variant of OCaml 4.07.1.

Add flags -memory-profiling and -sampling-rate to the daemon. The first flag enables profiling, the second is optional; a default (0.0001) is used if omitted.

When profiling is enabled, sending a SIGUSR1 signal to the process generates a file memory_profile, which shows the number of sampled allocations at different code points.

According to the memprof author, compile times should be the same as vanilla OCaml, and if profiling is not enabled, run times should be the same. With the default sampling rate, it's claimed there's a less-than-10% runtime penalty.

psteckler added 4 commits Aug 20, 2019

@psteckler psteckler force-pushed the feature/memprof-support branch from fba2e7b to a501553 Aug 21, 2019

psteckler added 3 commits Aug 21, 2019
@bkase
bkase approved these changes Aug 21, 2019
@imeckler
Copy link
Contributor

left a comment

neat

@cmr
cmr approved these changes Aug 21, 2019
Copy link
Contributor

left a comment

Cool. If we don't see the OCaml heap using all the memory, I guess that would indicate an FFI-related leak?

@psteckler

This comment has been minimized.

Copy link
Contributor Author

commented Aug 21, 2019

Cool. If we don't see the OCaml heap using all the memory, I guess that would indicate an FFI-related leak?

I believe so.

@psteckler psteckler merged commit e1401c1 into develop Aug 21, 2019

20 of 21 checks passed

ci/circleci: build-macos CircleCI is running your tests
Details
Summary 1 rule matches
Details
ci/circleci: build-artifacts--testnet_postake_many_proposers_medium_curves Your tests passed on CircleCI!
Details
ci/circleci: build-artifacts--testnet_postake_medium_curves Your tests passed on CircleCI!
Details
ci/circleci: build-wallet Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test--fake_hash Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_bootstrap Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_catchup Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_delegation Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_five_even_snarkless Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_five_even_txns Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_holy_grail Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_snarkless Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_split Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_split_snarkless Your tests passed on CircleCI!
Details
ci/circleci: test--test_postake_txns Your tests passed on CircleCI!
Details
ci/circleci: test-unit--dev Your tests passed on CircleCI!
Details
ci/circleci: test-unit--test_postake_snarkless_unittest Your tests passed on CircleCI!
Details
ci/circleci: tracetool Your tests passed on CircleCI!
Details

@psteckler psteckler deleted the feature/memprof-support branch Aug 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.