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

Performance: Do not schedule Session.purge if this Session is not used #15064

Conversation

isimluk
Copy link
Member

@isimluk isimluk commented May 11, 2017

You can use memcache OR SQL session. When you use memcache this whole job does nothing. Just inserts into a queue, updates queue, selects empty from Session and then removes from queue.

This also frees up some memory and scheduler cycles. Yaix!

Note, we already require users (in documentation) to restart EVM server when they change session store (so we can do this).

You can use memcache or SQL session. When you use memcache this whole
job does nothing. Just inserts into a queue, updates queue, selects
empty from Session and then removes from queue.

This also frees up some memory and scheduler cycles. Yaix!

Note, we already require users (in documentation) to restart EVM server
when they change session store (so we can do this).
@isimluk isimluk force-pushed the avoid-queue-overhead-if-session-is-turned-off branch from d179c7e to d393bef Compare May 11, 2017 09:09
@miq-bot
Copy link
Member

miq-bot commented May 11, 2017

Checked commit isimluk@d393bef with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 👍

@martinpovolny
Copy link
Member

@imtayadeway, @gtanzillo : any reason not to merge this one?

Makes sense and the code looks good to me.

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

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

👍 I'm good with this change

@martinpovolny martinpovolny merged commit 493a488 into ManageIQ:master May 16, 2017
@martinpovolny martinpovolny added this to the Sprint 61 Ending May 22, 2017 milestone May 16, 2017
@isimluk isimluk deleted the avoid-queue-overhead-if-session-is-turned-off branch May 16, 2017 17:43
@kbrock
Copy link
Member

kbrock commented Oct 24, 2017

This has minimal to no performance impact - 1 query returning 0 records.
But in my environment, this represents 39% of the messages processed by the GenericWorker.

And, it is also only applicable to customers running with AR sessions (basically if they are running a load balancer)

I would like to backporting to fine/yes

@kbrock kbrock added fine/yes and removed fine/no labels Oct 24, 2017
@isimluk
Copy link
Member Author

isimluk commented Oct 24, 2017

Sounds good.

Cheers!

🛀

@isimluk
Copy link
Member Author

isimluk commented Oct 24, 2017

This has minimal to no performance impact - 1 query returning 0 records.

Actually to do this nothing job we need to:

  • insert the job into queue
  • select the job from the queue
  • update the job in the queue (say its in progress)
  • process -> do nothing -> select empty
  • delete the job from the queue

And now ... let me count the syscalls...

@simaishi
Copy link
Contributor

simaishi commented Nov 1, 2017

@kbrock Is there a BZ for this? Need a BZ to backport to Fine branch...

@kbrock
Copy link
Member

kbrock commented Nov 6, 2017

simaishi pushed a commit that referenced this pull request Nov 6, 2017
…n-is-turned-off

Performance: Do not schedule Session.purge if this Session is not used
(cherry picked from commit 493a488)

https://bugzilla.redhat.com/show_bug.cgi?id=1510054
@simaishi
Copy link
Contributor

simaishi commented Nov 6, 2017

Fine backport details:

$ git log -1
commit 15889ffdf20cdd4f13a11c00a19b931f0808e13e
Author: Martin Povolny <[email protected]>
Date:   Tue May 16 15:39:19 2017 +0200

    Merge pull request #15064 from isimluk/avoid-queue-overhead-if-session-is-turned-off
    
    Performance: Do not schedule Session.purge if this Session is not used
    (cherry picked from commit 493a4884dfd141d7cb3640446d35738c67e42e69)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1510054

d-m-u pushed a commit to d-m-u/manageiq that referenced this pull request Jun 6, 2018
…f-session-is-turned-off

Performance: Do not schedule Session.purge if this Session is not used
(cherry picked from commit 493a488)

https://bugzilla.redhat.com/show_bug.cgi?id=1510054
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.

6 participants