CPU , Memory usage of bulk load using COPY

Moderator: NorbertKrupa

Post Reply
Roopalini
Newbie
Newbie
Posts: 13
Joined: Sun Jan 26, 2014 9:40 pm

CPU , Memory usage of bulk load using COPY

Post by Roopalini » Mon Jan 27, 2014 8:29 pm

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

User avatar
Julie
Master
Master
Posts: 221
Joined: Thu Apr 19, 2012 9:29 pm

Re: CPU , Memory usage of bulk load using COPY

Post by Julie » Tue Jan 28, 2014 3:14 am

Maye this'll help?

Code: Select all

dbadmin=> copy test from '/home/dbadmin/test.txt';
 Rows Loaded 
-------------
           1
(1 row)
For CPU usage:

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)
For memory:

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

Roopalini
Newbie
Newbie
Posts: 13
Joined: Sun Jan 26, 2014 9:40 pm

Re: CPU , Memory usage of bulk load using COPY

Post by Roopalini » Tue Jan 28, 2014 9:43 pm

Thanks Julie! Appreciate your detailed response :-)

Post Reply

Return to “New to Vertica Database Administration”