Thursday, 2022-04-28

*** jpena|off is now known as jpena06:58
opendevreviewMerged openstack/project-team-guide master: Fix the dependency hierarchy in repo retirement process  https://review.opendev.org/c/openstack/project-team-guide/+/83778712:55
*** jpena is now known as jpena|off14:14
dansmithzzzeek: around for a db question?16:04
opendevreviewMerged openstack/governance master: Update Dmitriy Rabotyagov email  https://review.opendev.org/c/openstack/governance/+/83947016:10
opendevreviewMerged openstack/governance master: Remove oslo's TaCT SIG liaisons  https://review.opendev.org/c/openstack/governance/+/83931716:10
zzzeekdansmith: hey16:28
dansmithhey, so.. I'm trying to gather some mysql stats.. specifically what I want is "number of queries" per database (ideally separated between select and insert, but not critical)16:28
dansmithseems like performance_schema statement history is the way to do that,16:29
dansmithbut it ends up being really heavy for the number of queries we make during a full CI run16:29
dansmithI don't need to capture all the queries, just the counts ideally, but it like it's either that or nothing16:29
dansmithglobal "all queries across all databases" is not useful16:29
dansmithzzzeek: so, do you know of any other way?16:29
zzzeeki havent worked with performance_schema, whats "heavy" about it, it slows performance or just too much config / disk space / etc ?16:30
dansmithit inflates our memory footprint by a lot. when I picked an arbitrary upper limit of keeping 1m rows, it OOMs16:30
zzzeekother ways are, log MySQL queries and do a lot of grepping, or on the app side put an event handler to log queries in the way you want16:31
dansmith300k isn't enough, so ..16:31
dansmithI want to do it out-of-body so not requiring changes to projects16:31
dansmithack on the query log, not terrible I guess, but it's all just so heavy for me to just get a damn integer count :P16:32
zzzeekwell the collectd plugin I hvae doesnt do queries right now, just connections, in theory it could do that16:32
dansmithhow?16:32
zzzeekoh id have to write new code for it, that deos the above event handlers16:32
dansmithoh this is not a plugin for collectd, but a plugin for the clients that reports to collectd?16:33
zzzeekOK dependeing on how motivated you are, there is a way to get event handlers injected into running apps via configuration alone, you still have to ship the code that's doing the event handling through16:33
zzzeekthe collectd thing is a plugin I wrote that is a plugin on both sides, collectd and the app side16:33
zzzeekbut it doesnt log queries right now16:33
dansmithokay16:33
dansmithI don't want queries, just query counts, but yeah sounds like your plugin might be a reasonable route16:34
dansmithre: the injection of the event handler, is that mysql config or oslo.db config?16:34
zzzeekthe plugin thing goes into the database URL in the query string16:34
zzzeekthat's how the collectd plugin sets up also16:34
dansmithah, neat16:35
zzzeekis this like a customer featre thing we want to roll out at some point or ....16:35
zzzeekb.c. if you need something today, or like, this month, i would just point you how to write your own plugin 16:35
dansmithno, this is for upstream CI monitoring for when we add a feature that causes us to do a billion new db requests16:35
dansmithzzzeek: if there's something I can look at as a guide or example, I might go for that16:36
zzzeekwell the collectd plugin has tripleo integration, though I think nobody has ever used it16:36
zzzeekand the project itself is at https://github.com/sqlalchemy/sqlalchemy-collectd16:36
zzzeeknow, if you wanted to write your own quicky SQLAlchemy plugin that can come in via config, the interface you implement is this one: https://docs.sqlalchemy.org/en/14/core/connections.html?highlight=createengineplugin#sqlalchemy.engine.CreateEnginePlugin16:37
dansmithanother really hacky thing I thought about was to set the limit on the statement log table in performance_schema to be something low, and then try to count-and-purge in a transaction every few seconds while a CI job is running16:37
dansmithpresumably it's just a database so I can do that16:37
zzzeekin fact the example shown there is almost exactly waht you want already16:37
dansmithhmm, yeah, that's interesting16:38
zzzeekso you can add mysql://foo:Bar@host?plugin=dans_logging_plugin16:38
dansmithyeah, nifty16:38
zzzeekanyway the colletd plugin above uses the same API to get its listeners in, and it transmits them to the collectd daemon which has a plugin on that end also16:39
zzzeeki think it's using udp i forget16:39
dansmithack16:40
dansmithokay well, this seems like a reasonable thing to chase for a bit16:40
zzzeekso anyhway, yes16:40
zzzeeki had hoped we wanted collectd stuff a long time ago back when joe T was doing a lot of it16:40
dansmiththanks a lot.. not really what I was expecting, but definitely better than grepping logs just to count I think16:40
zzzeekbut then he left and nobody wanted it :)16:41
dansmiththe classic story16:41
zzzeekbut yeah, if we want to revive the collectd plugin, beats me having to learn kubernetes16:41
zzzeek:)16:41
dansmiththe benefit of collectd I guess is that it handles the persistence for us,16:42
dansmithalthough locally I have tons of problems with collectd going off the rails and leaking memory until it OOMs, but that's probably one of the billion plugins I have loaded16:42
zzzeekwell also it is made for counting things 16:42
zzzeeklikely a plugin. i think the core is pretty solid16:43
dansmithyeah16:43
zzzeekbut certainly, my own plugin is a very plausible cause of OOM :)  since it's hardly been used16:43
zzzeeklike, it's not suppose to16:43
dansmithI mean locally as in my own infra monitoring disks and nics and such16:44
dansmithzzzeek: hot damn, that's cool17:04
zzzeekyup I rule17:04
zzzeek:)17:04
dansmithI am unable to disagree at the present time :)17:05
zzzeekha17:05
zzzeekwhich, the collectd thing?17:05
zzzeekor just the quickie plugin recipe17:05
dansmithyou claim ruling status without certainty? :) .. but I mean the plugin-in-url thing in general, bonus points for the quick example being most of the hard work :)17:07
zzzeekyeah.  i made that plugin API so i could do the collectd plugin for openstack17:10
dansmithah, well, it's pretty nifty17:11
zzzeekOK well i have to take my car into the dealer for repairs but if you work on something there keep me in the loop17:12
opendevreviewGage Hugo proposed openstack/governance master: Retire openstack-helm-docs  https://review.opendev.org/c/openstack/governance/+/83910017:16
dansmithzzzeek: ack, thanks17:23
opendevreviewGhanshyam proposed openstack/project-team-guide master: Explicitly mention the each steps of repo retirement  https://review.opendev.org/c/openstack/project-team-guide/+/83980718:02
dansmithzzzeek: back around by chance?21:04
dansmithmaybe nevermind21:30

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!