Hi Forum,
How can I calculate the CPU , memory usage of bulk loads using COPY command. When I run a bulk load, I don't see a session corresponding to it in the sessions table. Is the session details for bulk load recorded elsewhere.
I am trying to gauge the vertica performance for our bulk loads and would need to note down the CPU/memory usage accurately.
Thanks
CPU , Memory usage of bulk load using COPY
Moderator: NorbertKrupa
Re: CPU , Memory usage of bulk load using COPY
Maye this'll help?
For CPU usage:
For memory:
Code: Select all
dbadmin=> copy test from '/home/dbadmin/test.txt';
Rows Loaded
-------------
1
(1 row)
Code: Select all
dbadmin=> select
dbadmin-> qr.request,
dbadmin-> min(cu.start_time) start_time,
dbadmin-> min(cu.end_time) end_time,
dbadmin-> avg(cu.average_cpu_usage_percent) avg_cpu_percent
dbadmin-> from query_requests qr
dbadmin-> join cpu_usage cu
dbadmin-> on trunc(qr.start_timestamp, 'MI') >= cu.start_time
dbadmin-> and trunc(end_timestamp, 'MI') <= cu.end_time
dbadmin-> where qr.request ilike 'copy test%'
dbadmin-> group by qr.request;
request | start_time | end_time | avg_cpu_percent
------------------------------------------+---------------------+---------------------+------------------
copy test from '/home/dbadmin/test.txt'; | 2014-01-27 20:37:00 | 2014-01-27 20:38:00 | 6.31777777777778
(1 row)
Code: Select all
dbadmin=> select
dbadmin-> qr.request,
dbadmin-> min(mu.start_time) start_time,
dbadmin-> min(mu.end_time) end_time,
dbadmin-> avg(mu.average_memory_usage_percent) avg_memory_percent
dbadmin-> from query_requests qr
dbadmin-> join memory_usage mu
dbadmin-> on trunc(qr.start_timestamp, 'MI') >= mu.start_time
dbadmin-> and trunc(end_timestamp, 'MI') <= mu.end_time
dbadmin-> where qr.request ilike 'copy test%'
dbadmin-> group by qr.request;
request | start_time | end_time | avg_memory_percent
------------------------------------------+---------------------+---------------------+--------------------
copy test from '/home/dbadmin/test.txt'; | 2014-01-27 20:37:00 | 2014-01-27 20:38:00 | 9.67
(1 row)
Thanks,
Juliette
Juliette
Re: CPU , Memory usage of bulk load using COPY
Thanks Julie! Appreciate your detailed response