Skip to content

fix: Add some more stats to basic status page of TUI (disk usage, chain timestamp, tx pool size)#3046

Merged
antiochp merged 3 commits into
mimblewimble:masterfrom
notjustanyusername:more_stats
Sep 19, 2019
Merged

fix: Add some more stats to basic status page of TUI (disk usage, chain timestamp, tx pool size)#3046
antiochp merged 3 commits into
mimblewimble:masterfrom
notjustanyusername:more_stats

Conversation

@notjustanyusername
Copy link
Copy Markdown

@notjustanyusername notjustanyusername commented Sep 17, 2019

Hi. I added some more stats to the basic status page of the TUI to help node operators.

  • Disk usage measured in GB
  • Chain tip timestamp
  • Tx pool size
  • Stem pool size

I've run this against mainnet and everything appears to be updating in real time as expected.

image

@DavidBurkett
Copy link
Copy Markdown
Member

This is awesome! One small comment in the code, but otherwise LGTM.

@notjustanyusername
Copy link
Copy Markdown
Author

Thanks @DavidBurkett but I can't see your comment for some reason.

pub peer_count: u32,
/// Chain head
pub head: chain::Tip,
pub chain_stats: ChainStats,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to replace header_head with a ChainStats as well?
It would be useful to see the timestamp for the header chain during the initial header sync.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep will do

Comment thread servers/src/grin/server.rs Outdated
total_difficulty: head.total_difficulty(),
};

let disk_usage_gb = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this is measuring disk usage for the main lmdb database.
We also use significant storage for the various MMR files as well (and the peers lmdb database, but less so).

chain_data/lmdb
chain_data/peer
chain_data/header/header_head
chain_data/header/sync_head
chain_data/txhashset/kernel
chain_data/txhashset/output
chain_data/txhashset/rangeproof

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These looked very small which is why I left them out. But I realise now I'm not running full archive and network activity is only low at the moment. I'll see about adding them to the usage statistic.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The kernel and rangeproof MMRs should be approx 150MB each on mainnet, regardless of archive mode.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I was not looking hard enough.. I see them now. I added the Walkdir crate to go through the whole db_root dir, it's small has a nice API, do you think it's ok?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependency on walkdir is fine I think. We already use it in the util crate. 👍

Copy link
Copy Markdown
Member

@antiochp antiochp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@antiochp antiochp added this to the 2.1.0 milestone Sep 19, 2019
@antiochp antiochp merged commit 02cee80 into mimblewimble:master Sep 19, 2019
@antiochp
Copy link
Copy Markdown
Member

Transaction Pool Size and Stem Pool Size are awesome on the summary screen by the way. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants