Re: [RFC] Add jit deform_counter
От | Dmitry Dolgov |
---|---|
Тема | Re: [RFC] Add jit deform_counter |
Дата | |
Msg-id | 20230415144057.hztfuirtw3sofrwb@erthalion.local обсуждение исходный текст |
Ответ на | Re: [RFC] Add jit deform_counter (Dmitry Dolgov <9erthalion6@gmail.com>) |
Ответы |
Re: [RFC] Add jit deform_counter
|
Список | pgsql-hackers |
> On Fri, Mar 31, 2023 at 07:39:27PM +0200, Dmitry Dolgov wrote: > > On Wed, Mar 29, 2023 at 01:50:37PM +1300, David Rowley wrote: > > On Sun, 12 Jun 2022 at 21:14, Dmitry Dolgov <9erthalion6@gmail.com> wrote: > > > I've noticed that JIT performance counter generation_counter seems to include > > > actions, relevant for both jit_expressions and jit_tuple_deforming options. It > > > means one can't directly see what is the influence of jit_tuple_deforming > > > alone, which would be helpful when adjusting JIT options. To make it better a > > > new counter can be introduced, does it make sense? > > > > I'm not so sure about this idea. As of now, if I look at EXPLAIN > > ANALYZE's JIT summary, the individual times add up to the total time. > > > > If we add this deform time, then that's no longer going to be true as > > the "Generation" time includes the newly added deform time. > > > > master: > > JIT: > > Functions: 600 > > Options: Inlining false, Optimization false, Expressions true, Deforming true > > Timing: Generation 37.758 ms, Inlining 0.000 ms, Optimization 6.736 > > ms, Emission 172.244 ms, Total 216.738 ms > > > > 37.758 + 6.736 + 172.244 = 216.738 > > > > I think if I was a DBA wondering why JIT was taking so long, I'd > > probably either be very astonished or I'd report a bug if I noticed > > that all the individual component JIT times didn't add up to the total > > time. > > > > I don't think the solution is to subtract the deform time from the > > generation time either. > > > > Can't users just get this by looking at EXPLAIN ANALYZE with and > > without jit_tuple_deforming? > > It could be done this way, but then users need to know that tuple > deforming is included into generation time (I've skimmed through the > docs, there seems to be no direct statements about that, although it > could be guessed). At the same time I don't think it's very > user-friendly approach -- after all it could be the same for other > timings, i.e. only one counter for all JIT operations present, > expecting users to experiment how would it change if this or that option > will be different. > > I agree about adding up to the total time though. What about changing > the format to something like this? > > Options: Inlining false, Optimization false, Expressions true, Deforming true > Timing: Generation 37.758 ms (Deforming 1.234 ms), Inlining 0.000 ms, Optimization 6.736 ms, Emission 172.244 ms, Total216.738 ms > > This way it doesn't look like deforming timing is in the same category > as others, but rather a part of another value. Here is the patch with the proposed variation.
Вложения
В списке pgsql-hackers по дате отправления: