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

RandomX: print VM allocation warnings only once #8705

Merged
merged 2 commits into from
Feb 6, 2023

Conversation

SChernykh
Copy link
Contributor

To reduce warning spam when large pages are unavailable.

@selsta
Copy link
Collaborator

selsta commented Jan 11, 2023

I'd prefer if this would get moved to info level log.

On macOS there is no way to remove this warning, we already use VM_FLAGS_SUPERPAGE_SIZE_2MB in RandomX which is the macOS equivalent for huge pages.

@SChernykh
Copy link
Contributor Author

On macOS there is no way to remove this warning

I googled a bit and it seems you just need to to run with sudo or whatever it's called on macOS. Not a solution for everyone though.

@selsta
Copy link
Collaborator

selsta commented Jan 11, 2023

I tried it already with sudo, same warnings.

src/crypto/rx-slow-hash.c Outdated Show resolved Hide resolved
src/crypto/rx-slow-hash.c Show resolved Hide resolved
@SChernykh
Copy link
Contributor Author

@selsta @jeffro256 I combined both your proposals in the second commit. This should work well for everyone.

@hyc
Copy link
Collaborator

hyc commented Jan 14, 2023

Are you sure MacOS hugepages aren't usable? They should still be supported on x86, even though there's no support on aarch64.

@SChernykh
Copy link
Contributor Author

We do use VM_FLAGS_SUPERPAGE_SIZE_2MB in virtual_memory.c for RandomX, so it should work on MacOS when run with sudo, but @selsta says it doesn't work. I don't have anything from Apple, so I can't check.

@selsta
Copy link
Collaborator

selsta commented Jan 14, 2023

I tested on aarch64, will check again with x86.

@hyc
Copy link
Collaborator

hyc commented Jan 14, 2023

Yeah, there are docker images to boot MacOS on a regular PC, but they only work with actual Intel CPUs, compatible to the models Apple used. I only have AMD CPUs here.

@plowsof
Copy link
Contributor

plowsof commented Jan 17, 2023

can we have this at log level 1 please, this caused me emotional distress because i thought my monerod was secretly mining and when e.g. running blockchain-stats i see the warning in the output:

# DATA
Date	Blocks/day	Blocks	Txs/Day	Txs	Bytes/Day	Bytes
2023-01-17 10:45:35.798	W Couldn't allocate RandomX cache using large pages
2023-01-12	423	2798323	10478	10478	26770465	26770465
2023-01-13	688	2799011	15464	25942	38953621	65724086
2023-01-14	774	2799785	15034	40976	38456559	104180645
2023-01-15	684	2800468	14076	55052	35789881	139970526

@SChernykh SChernykh force-pushed the rx_warning_tune_down branch from 92f58cc to b247f98 Compare January 17, 2023 17:13
@SChernykh
Copy link
Contributor Author

I've changed large page allocation messages back to mdebug (the same as it was before the refactoring in #8677)

@luigi1111 luigi1111 merged commit 5fae6d6 into monero-project:master Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants