[MXS-2748] Show how many commands were executed by a session when using Persistent Connections Created: 2019-10-29  Updated: 2021-02-01  Resolved: 2021-02-01

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 2.3.12
Fix Version/s: 6.0.0

Type: New Feature Priority: Major
Reporter: Wagner Bianchi (Inactive) Assignee: Niclas Antti
Resolution: Fixed Votes: 0
Labels: Monitoring

Sprint: MXS-SPRINT-119, MXS-SPRINT-120, MXS-SPRINT-121, MXS-SPRINT-122, MXS-SPRINT-123

 Description   

Folks,

For the sake of better tuning the max_sescmd_history and avoid it to be too large (wasting of memory) or even avoiding it to be too low, leading to inconsistencies, can we show up out of the maxctrl show sessions command how many session commands a session is running? The outcome here is to make sure we can have an average number + 10 to have a good measure for tunning the max_sescmd_history (also using the prune_sescmd_history to cap on the session's memory consumption).

Currently, we have this as a return for the maxctrl show sessions:

┌────────────────┬───────────────────────────┐
│ Id             │ 5900882
├────────────────┼───────────────────────────┤
│ Service        │ Galera-Service            │
├────────────────┼───────────────────────────┤
│ State          │ Session ready for routing │
├────────────────┼───────────────────────────┤
│ User           │ demo02                    │
├────────────────┼───────────────────────────┤
│ Host           │ ::ffff:10.4.0.32
├────────────────┼───────────────────────────┤
│ Connected      │ Mon Oct 28 02:33:05 2019
├────────────────┼───────────────────────────┤
│ Idle           │ 13.9
├────────────────┼───────────────────────────┤
│ Connections    │ ms-db01                   │
│                │ ms-db03                   │
│                │ ms-db02                   │
├────────────────┼───────────────────────────┤
│ Connection IDs │ 11253918
│                │ 10478447
│                │ 10501213
├────────────────┼───────────────────────────┤
│ Queries        │                           │
├────────────────┼───────────────────────────┤
│ Log            │                           │
└────────────────┴───────────────────────────┘

Maybe we can include the number of commands traffic'ed somewhere as we already have the Connection IDs being listed.

What do you think? Thanks!



 Comments   
Comment by markus makela [ 2019-10-29 ]

We can definitely add this into the `show service` output where it should provide the average and maximum values for session command history lengths.

Comment by Wagner Bianchi (Inactive) [ 2019-10-29 ]

Great! It can be a good source of information to tune MaxScale in that sense. Thanks, folks!

Generated at Thu Feb 08 04:16:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.