No Branch/Tag Specified
arm
asyncnotedecryption
danger
dev
dev-aarch64
dev-mac
dev-old-randomx
divzaddrs
dragonx
duke
freebsd
getfilterednotes
hip39
insync
jahway603
master
mvstuff
onryo
p2p_privacy
ramhash
relaytx
rx-largepages
setbestchain
warmup
witness_cache
wolfssl
wolfssl_win
z_createrawtransaction
z_importwallet
z_signmessage
v0.11.2.z0
v0.11.2.z1
v0.11.2.z2
v0.11.2.z3
v0.11.2.z4
v0.11.2.z5
v0.11.2.z6
v0.11.2.z7
v0.11.2.z8
v0.11.2.z9
v1.0.0
v1.0.0-beta1
v1.0.0-beta2
v1.0.0-rc1
v1.0.0-rc2
v1.0.0-rc3
v1.0.0-rc4
v1.0.1
v1.0.10
v1.0.10-1
v1.0.11
v1.0.11-rc1
v1.0.12
v1.0.12-rc1
v1.0.13
v1.0.13-rc1
v1.0.13-rc2
v1.0.14
v1.0.14-rc1
v1.0.15
v1.0.15-rc1
v1.0.2
v1.0.3
v1.0.4
v1.0.5
v1.0.6
v1.0.7-1
v1.0.8
v1.0.8-1
v1.0.9
v1.1.0
v1.1.0-rc1
v1.1.1
v1.1.1-rc1
v1.1.1-rc2
v1.1.2
v1.1.2-rc1
v2.0.0
v2.0.0-rc1
v2.0.1
v3.0.0
v3.1.0
v3.1.1
v3.10.0
v3.10.1
v3.10.2
v3.2.0
v3.2.1
v3.2.1-alpha
v3.2.1-beta
v3.2.2
v3.2.3
v3.3.0
v3.3.1
v3.3.2
v3.4.0
v3.4.1
v3.5.0
v3.5.1
v3.5.2
v3.6.0
v3.6.1
v3.6.2
v3.6.3
v3.7.0
v3.7.1
v3.8.0
v3.9.0
v3.9.1
v3.9.2
v3.9.3
v3.9.4
Labels
bounty up to 500 HUSH 2001-5000 bounty
bounty between 2001 and 5000 HUSH 501-2000 bounty
bounty between 501 and 2000 HUSH arm
something doesn't work on arm beginners
for new developers bug
may or may not be a bug build
problems building documentation
not enough information feature
new feature high priority
high priority i2p
related to i2p low priority
low priority medium priority
medium priority question
something is not clear release
release label or issue related to it testing
related to testing tor
related to tor wontfix
this won't be fixed
Apply labels
Clear labels
0-500 bounty
bounty up to 500 HUSH 2001-5000 bounty
bounty between 2001 and 5000 HUSH 501-2000 bounty
bounty between 501 and 2000 HUSH arm
something doesn't work on arm beginners
for new developers bug
may or may not be a bug build
problems building documentation
not enough information feature
new feature high priority
high priority i2p
related to i2p low priority
low priority medium priority
medium priority question
something is not clear release
release label or issue related to it testing
related to testing tor
related to tor wontfix
this won't be fixed
No Label
0-500 bounty
2001-5000 bounty
501-2000 bounty
arm
beginners
bug
build
documentation
feature
high priority
i2p
low priority
medium priority
question
release
testing
tor
wontfix
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
This issue currently doesn't have any dependencies.
Reference in new issue
There is no content yet.
Delete Branch '%!s(MISSING)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
https://github.com/zcash/zcash/pull/6192
This code is a huge reduction in RAM usage for a HUSH full node. It will reduce RAM usage by roughly 1344 bytes * block_height. With HUSH currently at block height 1314861 this means
1314861 * 1344 / (1024^3) ~ 1.65 GB
of RAM savings at the very least. With txindex and other indexes enabled, it may be much more.Equihash block headers are much larger than RandomX, at 1344 vs 32 bytes for the "solution". Even so, DragonX will get a memory savings of
342741 * 32 / (1024^2) ~ 10.46 MB
at the very least.Code has been pushed on the
reduce_memory
branch, needs testingI got an assertion in new code immediately after startup, but I was testing with -rescan -rescanheight and the node had recently crashed. Needs more testing in various situations.
I have two identical nodes, the code seems to be effective, RAM usage on the first node is where the code was upgraded to
reduce_memory
.@onryo thanks for testing, good to know it works for you.
I would expect a lot more RAM savings. How long was the node running when you took those snapshots of RAM usage? I think it takes some time for the new code to "trim" unnecessary RAM usage after startup, I am not sure how long. hushd on my system uses 5.9GB by itself on the dev branch. Also, it's not clear what is being shown, Virtual or Resident memory. Use
htop
ortop
and pressM
to sort by memory, that will give more useful stats.@onryo the code seems to work for you but coredumps for @fekt and I, so it would be useful to know what you are doing differently than us. Did you do a fresh sync or were you using the master branch (or last release) before switching to this branch?
I was running the latest master branch, then I stopped the node, pulled the new commits, built and run with
-reindex
. RAM usage stays the same as in the above snapshot and to be fair 900MB reduction is a huge deal as well.@onryo ok, good to know. I recently pushed another commit which should speed up startup by 3X and reduce disk io of startups by a lot, please test that as well.
My goal is to improve the code so a
-reindex
is not needed. IfphashBlock
is empty, the code should be smart enough to populate it with theCBlockHeader.GetHash()
method@onryo it also would be good to know: Do you get an assertion/crash if you do not use
-reindex
? Note that the assertion might only be triggered when switching branches, so we need to know if you switched branches since the last sync, and if-reindex
was used. This is important to test, because for the average user, they will be syncing from the previous release, then they will be doing the equivalent of "switching branches" if they upgrade to a new release which has thereduce_memory
code.Merging this branch is blocked on #292. The latest code uses
CBlockHeader.GetHash()
ifphashBlock == NULL
but more is needed.this branch has been merged to dev, please test thoroughly! I am seeing roughly 2GB memory savings. Open up a new issue for any problems that may arise