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

Adds missing logs and other minor convenient additions #362

Merged
merged 11 commits into from
Dec 28, 2023

Conversation

michaelsutton
Copy link
Contributor

@michaelsutton michaelsutton commented Dec 20, 2023

Adds some missing logs and is meant to be an aggregated PR for other minor convenient additions. Please open a PR over this branch if you wish to add anything. All changes should be small in scope.

Some suggestions to add here:

  1. Add to Consensus an atomic boolean set at Consensus::signal_exit which can be used by processors such as the pruning processor to exit long operations early if the app is shutting down. Another place to use this flag is PruningProofManager::validate_pruning_point_proof.
  2. Add --norpc flag support to kaspad cmd options
  3. Metrics logs: split perf-monitor metrics log to two more readable and short lines. Consider printing numbers also in readable format with units such as KB,MB,GB. Change cmd option perf_metrics_interval_sec default value to 10. **

** Current state:

2023-12-20 09:50:04.076+02:00 [TRACE] [perf-monitor] metrics: CountersSnapshot { resident_set_size: 6538289152, virtual_memory_size: 15633260544, core_num: 24, cpu_usage: 0.779554540262707, fd_num: 3069, disk_io_read_bytes: 307925639168, disk_io_write_bytes: 411801882624, disk_io_read_per_sec: 22688499.00039984, disk_io_write_per_sec: 16169864.854058377 }

Desired state:

2023-12-20 09:50:04.076+02:00 [TRACE] [perf-monitor] process metrics: RSS: 6538289152 (6.53GB), VIRT: 15633260544 (15.63GB), cores: 24, cpu usage (per core): 0.779
2023-12-20 09:50:04.076+02:00 [TRACE] [perf-monitor] disk io metrics: FD: 3069, read: 307925639168 (307GB), write: 411801882624 (411GB), read rate: 22688499.00039984 (22MB/s), write rate: 16169864.854058377 (16MB/s) 

(the only reason to keep the long numbers as well is for log parsing)

@someone235 someone235 marked this pull request as draft December 24, 2023 16:13
someone235
someone235 previously approved these changes Dec 24, 2023
@michaelsutton michaelsutton marked this pull request as ready for review December 28, 2023 16:27
@michaelsutton michaelsutton merged commit 558c868 into kaspanet:master Dec 28, 2023
6 checks passed
KashProtocol pushed a commit to Kash-Protocol/rusty-kash that referenced this pull request Jan 5, 2024
KashProtocol pushed a commit to Kash-Protocol/rusty-kash that referenced this pull request Jan 8, 2024
KashProtocol pushed a commit to Kash-Protocol/rusty-kash that referenced this pull request Jan 9, 2024
D-Stacks pushed a commit to D-Stacks/rusty-kaspa that referenced this pull request Jan 23, 2024
* p2p connmanager - log the connect err

* IBD with headers proof logs

* log if search for missing bodies is taking too long

* Exit early on pruning processor when exit signal is received

* Exit early on pruning point validation when process exit is initiated

* Rename is_process_exiting to is_consensus_exiting

* Change atomic ordering for exit signal to relaxed

* Split logging of performance metrics into better readable lines (#4)

* Split logging of performance metrics

Affects:
- daemon.rs
- simpa

* Make daemon.rs log perf metrics if enabled

* Log perf metrics via impl Display

* Remove loglevel default changes

With impl Display, we don't need to change loglevels
to display perf metrics

* use 2 sub-structs for metrics display

* print precision + relocate fd

* use RAM (over RES/RSS) + optimize and fix edge case in `to_human_readable`

---------

Co-authored-by: coderofstuff <[email protected]>
smartgoo pushed a commit to smartgoo/rusty-kaspa that referenced this pull request Jun 18, 2024
* p2p connmanager - log the connect err

* IBD with headers proof logs

* log if search for missing bodies is taking too long

* Exit early on pruning processor when exit signal is received

* Exit early on pruning point validation when process exit is initiated

* Rename is_process_exiting to is_consensus_exiting

* Change atomic ordering for exit signal to relaxed

* Split logging of performance metrics into better readable lines (#4)

* Split logging of performance metrics

Affects:
- daemon.rs
- simpa

* Make daemon.rs log perf metrics if enabled

* Log perf metrics via impl Display

* Remove loglevel default changes

With impl Display, we don't need to change loglevels
to display perf metrics

* use 2 sub-structs for metrics display

* print precision + relocate fd

* use RAM (over RES/RSS) + optimize and fix edge case in `to_human_readable`

---------

Co-authored-by: coderofstuff <[email protected]>
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.

3 participants