These are chat archives for ManageIQ/manageiq/performance

20th
Jul 2016
Ari Zellner
@zeari
Jul 20 2016 07:48
This message was deleted
Hi, whats an efficient alternative to:
ContainerGroup.where(:container_project_id => ContainerProject.find_tagged_with(:all => "/managed/prov_max_cpu/1", :ns => "*").select(:id))
(Get all container groups belonging to a project with a certain tag)
Keenan Brock
@kbrock
Jul 20 2016 13:20
@zeari did you do a to_sql from this. it looks good
Joe Rafaniello
@jrafanie
Jul 20 2016 13:58
Do you have to include taggings, etc.?
Keenan Brock
@kbrock
Jul 20 2016 14:53
@akrzos running c&u timer locally against that database = 3 minutes
Alex Krzos
@akrzos
Jul 20 2016 14:53
ok
Keenan Brock
@kbrock
Jul 20 2016 14:53
there are still a number of queries and I'll look at reducing, but I'm not sure how it is taking longer than 10 minutes for you
different hardware
local database
Alex Krzos
@akrzos
Jul 20 2016 14:53
maybe i can "pause" what is going on there
and you can run it on the appliance?
Keenan Brock
@kbrock
Jul 20 2016 14:54
aah
please snapshot
I'm going to install some gems
Alex Krzos
@akrzos
Jul 20 2016 14:54
ok
snapshot the db appliance?
Keenan Brock
@kbrock
Jul 20 2016 14:54
um
no, db will be fine
what ever appliance you want me to run cap&u
Alex Krzos
@akrzos
Jul 20 2016 14:55
lets just do it on the db applaince to remove complexity
Keenan Brock
@kbrock
Jul 20 2016 14:55
I want to run via a rails runner
+1
Alex Krzos
@akrzos
Jul 20 2016 14:55
yeah that will be fine
ok so .23 right?
is the ip addr
Keenan Brock
@kbrock
Jul 20 2016 15:06
@akrzos 23.101
oops - did I get the wrong db?
Alex Krzos
@akrzos
Jul 20 2016 15:06
@kbrock nope
Keenan Brock
@kbrock
Jul 20 2016 15:06
lol
@akrzos here are the numbers I'm getting https://gist.github.com/kbrock/4c4aae376a43655c81905db83ad3d65e
I'll look into better looking up of parents
think that will show us the biggest benifit.
it's just that it is working so well for me locally, and I thought it would be good enough for you
ammusing / annoying that the biggest time hit is looking up alerting
Alex Krzos
@akrzos
Jul 20 2016 15:11
@kbrock I snapshotted the other db though
the one that ends in .23.23
I can snapshot .23.101
Keenan Brock
@kbrock
Jul 20 2016 15:11
nah
Alex Krzos
@akrzos
Jul 20 2016 15:12
if it's not too late
Keenan Brock
@kbrock
Jul 20 2016 15:12
I can login to that box, install gems
and go from there?
Alex Krzos
@akrzos
Jul 20 2016 15:12
ok cool
it snapshotted already
Keenan Brock
@kbrock
Jul 20 2016 15:12
what are we hoping to accomplish?
Alex Krzos
@akrzos
Jul 20 2016 15:12
see timer takes longer than 10minutes
Keenan Brock
@kbrock
Jul 20 2016 15:12
I run the same exact test locally
and there
and see that it takes longer than 10 min over there
k
hmm. I'm feeling like being lazy
I'll download that database
I have run metrics locally
not sure if I want to setup them up there
should I just run capture from the command line and see if it goes too long?
and then if it does, we can rollback and setup?
there seems to be a few scenarios
Alex Krzos
@akrzos
Jul 20 2016 15:17
mac book pro > sandy bridge multi-cpu, multi-core, hyperthreaded w/ 128GiB Memory w/ 15k sas disks storage
Keenan Brock
@kbrock
Jul 20 2016 15:17
  1. latency is killing us
  2. slower cpu (virtual) is getting us
  3. something strange is happening
  4. dumb error - like not restarting workers after updating
Alex Krzos
@akrzos
Jul 20 2016 15:17
also virt
:smile:
Keenan Brock
@kbrock
Jul 20 2016 15:17
alex
do you think my system is simply faster?
OR
do you think something else is happening?
if my system is simply faster, then I need to just chip away at slowest entries
Alex Krzos
@akrzos
Jul 20 2016 15:18
that would require a lot of analysis to say for sure, but absolutely your mac is faster
Keenan Brock
@kbrock
Jul 20 2016 15:18
but 3 min vs >10?
Alex Krzos
@akrzos
Jul 20 2016 15:18
haswell cpu is much better than sandy bridge
and i believe the task is mostly cpu bound
Keenan Brock
@kbrock
Jul 20 2016 15:18
my tools are not as polished as they can be
do we think the behavior is going to be that much different on vm than local?
Alex Krzos
@akrzos
Jul 20 2016 15:19
I've seen timings better than 50% by moving a vm off a sandy bridge to a haswell cpu machine
Keenan Brock
@kbrock
Jul 20 2016 15:19
right
if we are 75% certain that it is just a cpu thing, and the timings will be similar (with a multiple) - then I can just continue decreasing the slowest bits here
Alex Krzos
@akrzos
Jul 20 2016 15:20
combine that with pci express attached storage w/ 100,000iops vs like 180iops from a 15k sas drive
Keenan Brock
@kbrock
Jul 20 2016 15:20
I can just target the obscene number of db queries
but if you think 23 will have a different performance graph
showing things that are not just a multiplier, then I'm all in
adding insult to injury: You don't even have an alert installed. so 85% of this processing is useless :(
of course we don't know that while processing...
Alex Krzos
@akrzos
Jul 20 2016 15:26
If an alert is a component of the worklaod
I can certianly add that
Keenan Brock
@kbrock
Jul 20 2016 15:26
no
the detection of "is an alert is assigned to the vm/... ?" is part of the workload
Keenan Brock
@kbrock
Jul 20 2016 15:33
ok, I just ran again after truncating miq_queue and miq_tasks
the workflow is a different. but all in all, it does not majorly effect the outcome
there is a query that brings back 1.6k and I can rewrite it to bring back 4
and I hate the query
but it is taking 51ms+41ms db of the 184,147.8ms+57,977.9ms db
probably bigger fish to fry ;)
Keenan Brock
@kbrock
Jul 20 2016 18:13
@Fryguy ManageIQ/manageiq#9611 - you have time now?
Keenan Brock
@kbrock
Jul 20 2016 18:21
I added a [comment] to explain what I think we're talking about. used code as I'm hoping that will be more clear
@akrzos I can't run bundle in the appliance - it freaks over git
Keenan Brock
@kbrock
Jul 20 2016 18:37
@akrzos I installed git, but I can't bundle update, it is not registered with RHN
(on 23)
Jason Frey
@Fryguy
Jul 20 2016 19:02
@kbrock I am in a meeting, but I'll ping you after that?
Alex Krzos
@akrzos
Jul 20 2016 19:17
@kbrock hmm not sure what it's missing it should have some base repos added automaticlly by my ansible deployment playbooks
if those don't work
you could always use your employee account to register
or if you know where the right repo is we can add it to /etc/yum.repos.d/(repo file)
Dennis Metzger
@dmetzger57
Jul 20 2016 19:19
registering is a good option