Skip to content

osd/scheduler/mClockScheduler: Use same profile and client ids for all clients to ensure allocated QoS limit consumption. - #52809

Merged
yuriw merged 1 commit into
ceph:mainfrom
sseshasa:wip-mclock-client-lim-62293
Aug 22, 2023
Merged

yuriw merged 1 commit into
ceph:mainfrom
sseshasa:wip-mclock-client-lim-62293

Conversation

@sseshasa

@sseshasa sseshasa commented Aug 4, 2023 •

Copy link
Copy Markdown
Contributor

Currently, without the distributed mClock (dmClock) feature, all external clients classified under op_scheduler_class::client must share the allocated reservation and limit as set within default_external_client_info. This is realized only if all the external clients are assigned the same id. This was not true because the client_id field within the client_profile_id_t was set to item.get_owner() which uniquely identified each client. As a result, an increase in the client count resulted in a proportional increase in the consumption of the allocated limit which is not the desired outcome in the current implementation.

The fix is to use the same client_id and profile_id within the client_profile_id_t structure for all clients. These fields are set to '0'. This ensures that all such clients get the same QoS controls which means reservation and limit is shared between them. In other words, regardless of the number of clients active, the reservation and limit consumption remains constant as per the mClock profile setting and is shared amongst them.

NOTE: When dmClock feature (client vs client QoS) is implemented, the above fields would change with client_id set to the global id (client.####) and the profile_id set to the id generated by the client's QoS profile.

Tests were performed using rados bench with multiple instances on a single OSD to confirm that the limit allocation is
not breached. Test results will be updated soon.

Fixes: https://tracker.ceph.com/issues/62293
Signed-off-by: Sridhar Seshasayee [email protected]

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@sseshasa
sseshasa requested a review from a team as a code owner August 4, 2023 08:02
@github-actions github-actions Bot added the core label Aug 4, 2023
@sseshasa
sseshasa requested a review from athanatos August 4, 2023 08:02
@sseshasa

sseshasa commented Aug 4, 2023

Copy link
Copy Markdown
Contributor Author

Test Results
Random write tests were performed on a single OSD with 5 Rados bench instances.

Test type: Random write
Block Size: 4 KiB
Object Size: 4 KiB
Concurrent Writes: 16
Number of OSDs: 1 [pool size = 1]

mClock QoS_Limited_Bandwidth_Sharing_HDD

mClock QoS_Limited_Bandwidth_Sharing_SSD

@jianwei1216

Copy link
Copy Markdown
Contributor

@sseshasa look good to me, thanks share

  • background_recovery client:{ class_id: 0 client_id: 0 profile_id: 0 }
  • radosclient client:{ class_id: 3 client_id: 0 profile_id: 0 }
# date; ceph daemon osd.0 dump_op_pq_state
Mon Aug  7 05:04:21 UTC 2023
{
    "OSD:ShardedOpWQ:0": {
        "queue_sizes": {
            "immediate": 0,
            "scheduler": 9
        },
        "mClockClients": {
            "client_count": 2,
            "clients": "{ 
                 PriorityQueue:: 
                     { client:{ class_id: 0 client_id: 0 profile_id: 0 }, record:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.1118 p:384736.4122 l:384662.1525 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1118 p:384736.4122 l:384662.1525 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } }  
                     { client:{ class_id: 3 client_id: 0 profile_id: 0 }, record:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0223 p:384655.0603 l:384663.0223 } req_count:7 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0223 p:384655.0603 l:384663.0223 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } } } 
                     { reservation_top:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false  r:384662.1118 p:384736.4122 l:384662.1525 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1118 p:384736.4122 l:384662.1525 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } } 
                     { ready_top:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0223 p:384655.0603 l:384663.0223 } req_count:7 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0223 p:384655.0603 l:384663.0223 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } } } 
                     { limit_top:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.1118 p:384736.4122 l:384662.1525 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1118 p:384736.4122 l:384662.1525 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } } }"
        },
        "mClockQueues": {
            "queues": "
                   RESER:
                       { ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.1118 p:384736.4122 l:384662.1525 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1118 p:384736.4122 l:384662.1525 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }, 
                       { ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0223 p:384655.0603 l:384663.0223 } req_count:7 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0223 p:384655.0603 l:384663.0223 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }
                   LIMIT:
                       { ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.1118 p:384736.4122 l:384662.1525 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1118 p:384736.4122 l:384662.1525 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }, 
                      { ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0223 p:384655.0603 l:384663.0223 } req_count:7 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0223 p:384655.0603 l:384663.0223 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }
                   READY:
                       { ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0223 p:384655.0603 l:384663.0223 } req_count:7 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0223 p:384655.0603 l:384663.0223 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }, 
                       { ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.1118 p:384736.4122 l:384662.1525 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1118 p:384736.4122 l:384662.1525 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }"
        }
    },
    "OSD:ShardedOpWQ:1": {
        "queue_sizes": {
            "immediate": 0,
            "scheduler": 18
        },
        "mClockClients": {
            "client_count": 2,
            "clients": "{ PriorityQueue::  { client:{ class_id: 0 client_id: 0 profile_id: 0 }, record:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } req_count:9 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } }  { client:{ class_id: 3 client_id: 0 profile_id: 0 }, record:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0292 p:384659.0230 l:384663.0292 } req_count:9 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0292 p:384659.0230 l:384663.0292 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } } } { reservation_top:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } req_count:9 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } } { ready_top:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0292 p:384659.0230 l:384663.0292 } req_count:9 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0292 p:384659.0230 l:384663.0292 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } } } { limit_top:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } req_count:9 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } } }"
        },
        "mClockQueues": {
            "queues": "RESER:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } req_count:9 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }, { ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0292 p:384659.0230 l:384663.0292 } req_count:9 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0292 p:384659.0230 l:384663.0292 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }LIMIT:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } req_count:9 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }, { ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0292 p:384659.0230 l:384663.0292 } req_count:9 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0292 p:384659.0230 l:384663.0292 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }READY:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0292 p:384659.0230 l:384663.0292 } req_count:9 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0292 p:384659.0230 l:384663.0292 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }, { ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } req_count:9 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0930 p:384741.4377 l:384662.1527 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }"
        }
    },
    "OSD:ShardedOpWQ:2": {
        "queue_sizes": {
            "immediate": 0,
            "scheduler": 8
        },
        "mClockClients": {
            "client_count": 2,
            "clients": "{ PriorityQueue::  { client:{ class_id: 0 client_id: 0 profile_id: 0 }, record:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } req_count:5 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } }  { client:{ class_id: 3 client_id: 0 profile_id: 0 }, record:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0406 p:384656.0633 l:384663.0406 } req_count:3 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0406 p:384656.0633 l:384663.0406 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } } } { reservation_top:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } req_count:5 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } } { ready_top:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0406 p:384656.0633 l:384663.0406 } req_count:3 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0406 p:384656.0633 l:384663.0406 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } } } { limit_top:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } req_count:5 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } } }"
        },
        "mClockQueues": {
            "queues": "RESER:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } req_count:5 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }, { ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0406 p:384656.0633 l:384663.0406 } req_count:3 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0406 p:384656.0633 l:384663.0406 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }LIMIT:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } req_count:5 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }, { ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0406 p:384656.0633 l:384663.0406 } req_count:3 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0406 p:384656.0633 l:384663.0406 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }READY:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0406 p:384656.0633 l:384663.0406 } req_count:3 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0406 p:384656.0633 l:384663.0406 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }, { ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } req_count:5 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.1851 p:384735.0865 l:384662.1628 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }"
        }
    },
    "OSD:ShardedOpWQ:3": {
        "queue_sizes": {
            "immediate": 0,
            "scheduler": 3
        },
        "mClockClients": {
            "client_count": 2,
            "clients": "{ PriorityQueue::  { client:{ class_id: 0 client_id: 0 profile_id: 0 }, record:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } }  { client:{ class_id: 3 client_id: 0 profile_id: 0 }, record:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0412 p:384662.0562 l:384663.0412 } req_count:1 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0412 p:384662.0562 l:384663.0412 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } } } { reservation_top:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } } { ready_top:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0412 p:384662.0562 l:384663.0412 } req_count:1 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0412 p:384662.0562 l:384663.0412 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } } } { limit_top:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } } } }"
        },
        "mClockQueues": {
            "queues": "RESER:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }, { ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0412 p:384662.0562 l:384663.0412 } req_count:1 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0412 p:384662.0562 l:384663.0412 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }LIMIT:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }, { ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0412 p:384662.0562 l:384663.0412 } req_count:1 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0412 p:384662.0562 l:384663.0412 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }READY:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384663.0412 p:384662.0562 l:384663.0412 } req_count:1 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384663.0412 p:384662.0562 l:384663.0412 } client:{ class_id: 3 client_id: 0 profile_id: 0 } } }, { ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } req_count:2 top_req:{ ClientReq:: tag:{ RequestTag:: ready:false r:384662.0965 p:384726.7455 l:384662.0965 } client:{ class_id: 0 client_id: 0 profile_id: 0 } } }"
        }
    },
    "OSD:ShardedOpWQ:4": {
        "queue_sizes": {
            "immediate": 0,
            "scheduler": 0
        },
        "mClockClients": {
            "client_count": 2,
            "clients": "{ PriorityQueue::  { client:{ class_id: 0 client_id: 0 profile_id: 0 }, record:{ ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384661.9229 p:384730.2963 l:384661.9628 } req_count:0 top_req:none } }  { client:{ class_id: 3 client_id: 0 profile_id: 0 }, record:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0295 p:384659.0593 l:384662.0295 } req_count:0 top_req:none } } { reservation_top:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0295 p:384659.0593 l:384662.0295 } req_count:0 top_req:none } } { ready_top:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0295 p:384659.0593 l:384662.0295 } req_count:0 top_req:none } } { limit_top:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0295 p:384659.0593 l:384662.0295 } req_count:0 top_req:none } } }"
        },
        "mClockQueues": {
            "queues": "RESER:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0295 p:384659.0593 l:384662.0295 } req_count:0 top_req:none }, { ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384661.9229 p:384730.2963 l:384661.9628 } req_count:0 top_req:none }LIMIT:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0295 p:384659.0593 l:384662.0295 } req_count:0 top_req:none }, { ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384661.9229 p:384730.2963 l:384661.9628 } req_count:0 top_req:none }READY:{ ClientRec:: client:{ class_id: 3 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384662.0295 p:384659.0593 l:384662.0295 } req_count:0 top_req:none }, { ClientRec:: client:{ class_id: 0 client_id: 0 profile_id: 0 } prev_tag:{ RequestTag:: ready:false r:384661.9229 p:384730.2963 l:384661.9628 } req_count:0 top_req:none }"
        }
    }
}

@sseshasa

sseshasa commented Aug 7, 2023

Copy link
Copy Markdown
Contributor Author

@sseshasa look good to me, thanks share

* background_recovery  client:{ class_id: 0 client_id: 0 profile_id: 0 }

* radosclient                    client:{ class_id: 3 client_id: 0 profile_id: 0 }

@jianwei1216 Thanks for bringing up this issue and your feedback.

Comment thread src/osd/scheduler/mClockScheduler.h Resolved
Comment thread src/osd/scheduler/mClockScheduler.h Resolved
Comment thread src/osd/scheduler/mClockScheduler.h Resolved
Comment thread src/osd/scheduler/mClockScheduler.h Resolved
…l clients

Currently, without the distributed mClock (dmClock) feature, all external
clients classified under op_scheduler_class::client must share the
allocated reservation and limit as set within default_external_client_info.
This is realized only if all the external clients are assigned the same
id. This was not true because the client_id field within the
client_profile_id_t was set to item.get_owner() which uniquely identified
each client. As a result, an increase in the client count resulted in a
proportional increase in the consumption of the allocated limit which is
not the desired outcome in the current implementation.

The fix is to use the same client_id and profile_id within the
client_profile_id_t structure for all clients. These fields are set to '0'.
This ensures that all such clients get the same QoS controls which means
reservation and limit is shared between them. In other words, regardless
of the number of clients active, the reservation and limit consumption
remains constant as per the mClock profile setting and is shared amongst
them.

NOTE: When dmClock feature (client vs client QoS) is implemented, the
above fields would change with client_id set to the global id (client.####)
and the profile_id set to the id generated by the client's QoS profile.

Fixes: https://tracker.ceph.com/issues/62293
Signed-off-by: Sridhar Seshasayee <[email protected]>
@sseshasa
sseshasa force-pushed the wip-mclock-client-lim-62293 branch from f63f148 to 79a123c Compare August 10, 2023 04:38
@ljflores

Copy link
Copy Markdown
Member

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.

5 participants