Announcement

Collapse
No announcement yet.

Set slow query time per user and I'd 3 (adm)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Set slow query time per user and I'd 3 (adm)

    Hi,

    Is it possible to reduce the default slow query time from 30s to less for a particular user?
    ​​​​Presumably, if it is, then this is achieved with settings in mysql-governor.xml? (Could you post an example syntax please?)
    If it isn't possible then could I suggest you add it as a feature?

    if the governor is currently restricting a user then I gather the processes are dumped into lve with user id 3 , "adm".
    I can see adm with lvectl list-user however adm is missing from lvetop and lveps
    How can I then determine how busy adm is? On my server, adm has a quite large resource allocation: 4 cores, 512M with and nice ep, nproc and io.
    I'm concerned that even if the governor ejects the account into the lve, there are still sufficient resources in adm to cause a server-wide problem.

    Thanks

  • #2
    Hi,

    Yes, it's possible to reduce the slow query timeout in mysql-governor.xml, you would set/change there something like:

    Code:
    <limit name="slow" current="15"/>
    And restart governor.

    Are you sure those processes are related to the adm user? What are those processes?
    It does not looks to be a regular hosting user, even more - it have to be some system since regular users starts from id 500 (or 1000 in modern OSes). System users and do not have resource limits enforced by LVE.

    Comment


    • #3
      Thanks Bogdan

      I think you're referring to the default system-wide slow timeout.
      I'm interested in changing it for just one particular user. Is this possible?

      My understanding from reading about the governor is that when an account is restricted by the governor, its mysql processes are transferred into the lve. Is this correct ? I read the target lve account id is 3. On my machine this corresponds to a user named "adm".

      From your response I assume this isn't the case and the target lve account is just the user account currently restricted by the governor.

      Comment


      • #4
        Ah right! There was a 'single' mode of operation in MySQL governor when it was moving queries into the LVE with ID 3. It was deprecated few years ago.

        The recommended mode is 'abusers' - in that mode once user goes over the limits specified in the MySQL Governor , all his queries will execute inside that user's LVE. We strongly recommend using this mode of operations, please switch to it with:
        Code:
        dbctl --lve-mode abusers

        About the slow query execution - the limit can be configured per user as well, the config block will be the following:

        Code:
        <user name="specific_user" mysql_name="specific_user_mysql" mode="restrict">
        <limit name="slow" current="10"/>
        </user>

        Comment

        Working...
        X