-
jakoson0
Why does the Saviour of NASA take a group achievement award and present it as a proof of individual glory? twitter.com/hyc_symas/status/1203709575226183683
-
tevador
what is the current size of the data.mdb file on an unpruned node? mine says 139 GB, which seems suspiciously high
-
selsta
tevador: mine is 103G
-
sech1
103,736,483,840 bytes
-
koork[m]
Then why is the blockchain.raw from getmonero.org only ~85gb?
-
sech1
because it's old
-
sech1
and data.mdb has a lot of spare space inside
-
sech1
it doesn't grow in size with every new block
-
tevador
I'm not sure what happened to my node, it seems to keep resizing the database file until I run out of disk space (144 GB partition)
-
moneromooo
That's odd. If you can repro on restart, add *lmdb*:DEBUG
-
moneromooo
This should logs things about resizing, what size it thinks it has, etc.
-
tevador
not sure what I can do now, not enough disk space to restart monerod 148498685952 data.mdb
-
tevador
is there a way to shrink it?
-
moneromooo
mdb_copy maybe. You'd need a second temporary disk.
-
tevador
otherwise I'll have to rm and resync from scratch
-
moneromooo
(which could be a USB flash one)
-
moneromooo
Actually, restarting once after deleting some random ccache file or /tmp file should be enough. It'll fail at first restart but might still give interesting logs when trying to resize.
-
tevador
FYI last messages in the console before I killed it:
paste.debian.net/hidden/debe874f
-
tevador
so it wanted to make the file even larger
-
tevador
after restarting, still wants to resize by 1024 MB
-
moneromooo
Good. What DEBUG messages then ?
-
tevador
I managed to free 170 MB (lol) and seems to be syncing
-
tevador
a lot of spam in the logs
-
tevador
nothing interesting the logs besides: E !! WARNING: Insufficient free space to extend database !!: 167 MB available, 1024 MB needed
-
tevador
-
moneromooo
So it looks like it's actually using that allocated space. Really odd then.
-
tevador
is my monerod torrenting or what? :D
-
moneromooo
One thing you might try:
-
moneromooo
mdb_stats -a /path/to/monerod/lmdb
-
moneromooo
And compare with someone else who's got a non pruned db, see what DB has got the extra weight.
-
moneromooo
Assuming it's just one.
-
moneromooo
(I've only got ptuned nodes)
-
moneromooo
It won't tell us why, but might give a clue.
-
gingeropolous
my data.mdb: 97G Jan 24 15:52 data.mdb
-
gingeropolous
103353671680
-
tevador
mdb_env_open failed, error -30794 MDB_VERSION_MISMATCH: Database environment version mismatch
-
moneromooo
Build the mdb_stats from external/db_drivers/lmdb
-
iDunk
97 GB here as well.
-
moneromooo
(there's a makefile in there IIRC)
-
tevador
-
iDunk
-
moneromooo
Pretty similar...
-
moneromooo
Do you have some other program using hte DB ? Like a block explorer, etc ?
-
moneromooo
If so, the DB might need to keep track of another state if a long lived txn is live.
-
moneromooo
A very very large one though...
-
moneromooo
If not, I'm at the end of what I can usefully say about lmdb, hyc will have to take over.
-
iDunk
-
tevador
yes, block explorer
-
moneromooo
If you kill that block explorer, I have a feeling the "occupancy" will fall back way below 90%.
-
tevador
already killed it
-
moneromooo
Though I'm not sure what happens if you SIGKILL. How the db knows it can drop the pages...
-
tevador
ACID databases must survive SIGKILL
-
moneromooo
ie, when a long lived read txn stops, the old state can be dropped, but if a process dies hard... hyc ? :)
-
moneromooo
Oh, it'd be consistent, but I'm not sure how the old state can be dropped.
-
moneromooo
file locks maybe.
-
moneromooo
That gets cleared by the OS on process end.
-
tevador
I know sqlite has a vacuum command
-
moneromooo
Oh god. I used to have to do that regularly on Firefox to keep it from getting too slow.
-
» moneromooo afk for a bit
-
tevador
if there is no in-place shrink for mdb, I'll have to delete and resync from scratch
-
tevador
-
tevador
"We hope that this gives you a better understanding how LMDB is designed and why the size of .mdb files can vary between providers and consumers (even by gigabytes), even when all contain the exact same data as the others. "
-
tevador
essentially, my database file contains 40 GB of junk that can't be removed, oh well
-
selsta
fwiw gingeropolous also had weird issues on the node where he hosted onion explorer
-
hyc
if you use mdb_stat -r it will show any stale readers
-
hyc
and mdb_stat -rr will purge them
-
hyc
whatever block explorer gingeropolous is running tends to leave stale read txns all over the place
-
hyc
that's broken explorer code
-
hyc
mdb_stat -eff will show how much of the space is occupied by free pages
-
hyc
that's the danger of a DB engine that supports multi-process access - a process accesses it that has buggy code, and screws things up for other users
-
tevador
hyc: mdb_stat shows 17 readers from monerod, 4 from the block explorer
-
hyc
that doesn't sound problematic
-
tevador
mdb_stat -eff returns 10990719 Free pages
-
hyc
that's excessive
-
hyc
anyway, the only thing to worry about is if there are stale readers hanging around
-
tevador
if one page is 32K, that would explain the 40 GB over normal size
-
hyc
is that on an M1?
-
hyc
everything else only uses 4KB pages
-
tevador
it's an amd epyc based VPS
-
hyc
I don't think they have a 32KB pagesize
-
hyc
but you have almost 11M pages at 4KB each which would get you 40GB
-
tevador
yeah, correct, I misread that as 1M
-
tevador
so why does monerod insist on allocating additional 1 GB?
-
tevador
if there are already 40 GB of free pages
-
hyc
it's only comparing current size to estimated size of incoming batches
-
hyc
it doesn't know that 40GB of the size is freespace
-
tevador
that sounds like a bug
-
tevador
is there a way to shrink the file at least a few GB?