-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Load wallet file very slow #8740
Comments
What kind of hardware do you have? I don't have a 600MB wallet cache file but a 60MB one takes less than a second to load. Two hours is definitely not normal. |
I have tried a 600MB wallet file now, doesn't take more than 2-3 seconds. Are you sure that you have enough free RAM? |
Which wallet are you using? Which version are you using? Where did you get the binaries? |
Problems with slow file loading: |
Does the same issue exist with v0.18.1.2? |
Not tried v0.18.1.2 |
Using version is v0.18.0.0 ,Have not tried v0.18.1.2 |
The reason for the slow loading of the wallet has been found. It is because m_subaddresses and m_subaddress_labels have 10.7 million records each, while the actual subaddress is only more than 50,000. How should it be optimized? |
Is this an exchange wallet? |
Only one wallet file that contains all wallet addresses, self-created and exchange |
#5370 is likely to speedup loads, it uses a flat vector to store subaddresses. Doesn't do anything for labels, but since most labels are probably empty, I'll make another patch that omits those altogether. |
5370 is now rebased to current master. Let us know if you get any speedup. I'll look at what we can do for labels now. |
BTW, this will make your wallet cache incompatible with current master or release, so only use this on a COPY of your wallet cache. |
Oh, and you want to try loading it with this code after it's been saved with this code, so it then loads the new format, not the old one plus conversion. |
Pushed again with serialization fixes, serialization changed to use monero instead of boost since 2019. |
I don't understand. Do you mean you definitely do not have 10 million subaddresses, not even remotely that many, only somewhat over 50,000, yet if you look at the map and the vector, they have 10 million elements each? If yes, something does not square here, if you ask me. |
Actually, it doesn't work yet, can't load old wallet caches. I'll fix. |
Fixed. |
That said, I tried with a 900 MB cache (5k accounts, 5k subaddresses per account), and it loads in less than 30 seconds with current master. So that doesn't seem to be your problem. |
In fact, on that 5k/5k wallet, loading the subaddress data takes very little time in the first place, after adding timing code. |
I tried a similar thing for labels, but it turns out it gains nothing, as labels are already implicitely optimized out. |
Thanks for all the replies above,I'll run the test again and see the result |
Using Java to invoke an xmr so library to load a wallet file and serialize 100 million sub-addresses is very slow. |
Wait. Is it our code you're using or someone else's ? Just making sure :D |
you have a Discord account for convenient Do chatting? |
No, IRC on the libera.chat network in #monero is appropriate. It's accessible via matrix. |
Modify the monero code compilation output a Library ,then java integration that ,loading monero wallet very slow |
When the Java calls monero library of SO to load the wallet file, the prompt loading failed malloc. Memory allocation failed, then through ulimit to modify the max lockmemory size, change 64 to 102400. After modification, the wallet can be loaded normally, but it is very slow when serializing 10 million sub-addresses. |
system's The memory is adequate. |
The program started running, and the process of serializing 10 million subaddresses while loading the wallet was very slow, taking 2 hours and 9 minutes |
You were asked two things (try with the patch linked, and post the output of perf top), which you ignored. Asking the same thing again will not help. The perf top output is likely the one most likely to help determine where the issue lies. |
The process of serializing the contents of the wallet file into memory objects during the wallet file loading process at program startup is very slow, and a 600M file takes two hours.
Why is this taking so long? Is this normal? If not, what is causing the delay?
The text was updated successfully, but these errors were encountered: