Parallel Execution of UDFs
Posted: Thu Aug 22, 2013 4:15 pm
Hi,
I have implemented a UDF written in C++ and I am trying to understand the performance I am experiencing.
I am running on a 24 cores 16GB Server (single node) and using Vertica 6.1.
My function is running in fenced mode.
My query is relatively simple and looks like:
select
key1,
key2,
key3,
AnalyzeMetric(
timestamp,
value)
OVER
(PARTITION BY key1,
key2,
key3
ORDER BY timestamp)
from DB.yonatan.application_performance where application like 'p%'
My function named AnalyzeMetric returns a single row for each invocation, and the partition clause I am using should break the input into exactly 1000 invocations that potentially may be executed in parallel but for some reason it seems like Vertica runs my query using a single thread and does not take advantage of other available cores.
During execution I see that UDX process nlwp goes from 2 to 3.
ps -eo pid,comm,lstart,etime,time,nlwp | grep vertica-udx-C++
10639 vertica-udx-C++ Thu Aug 22 14:03:43 2013 41:55 00:22:23 /opt/vertica/bin/vertica-ud 3
Should I be expecting parallel execution only on multi node cluster where data is segmented?
What am I missing?
I have implemented a UDF written in C++ and I am trying to understand the performance I am experiencing.
I am running on a 24 cores 16GB Server (single node) and using Vertica 6.1.
My function is running in fenced mode.
My query is relatively simple and looks like:
select
key1,
key2,
key3,
AnalyzeMetric(
timestamp,
value)
OVER
(PARTITION BY key1,
key2,
key3
ORDER BY timestamp)
from DB.yonatan.application_performance where application like 'p%'
My function named AnalyzeMetric returns a single row for each invocation, and the partition clause I am using should break the input into exactly 1000 invocations that potentially may be executed in parallel but for some reason it seems like Vertica runs my query using a single thread and does not take advantage of other available cores.
During execution I see that UDX process nlwp goes from 2 to 3.
ps -eo pid,comm,lstart,etime,time,nlwp | grep vertica-udx-C++
10639 vertica-udx-C++ Thu Aug 22 14:03:43 2013 41:55 00:22:23 /opt/vertica/bin/vertica-ud 3
Should I be expecting parallel execution only on multi node cluster where data is segmented?
What am I missing?