Time of query execution much different between 3 servers


 
Thread Tools Search this Thread
Operating Systems AIX Time of query execution much different between 3 servers
# 1  
Old 01-11-2016
Time of query execution much different between 3 servers

Hello,

I have 3 AIX 6.1 machines running INFORMIX 11.7 database engine.
One of these servers is the database server and the other 2 servers are connecting to it.
I am doing a test to determine the time of query execution between these servers and i see that in specific times one of these server is taking much more response time.
Here is an example of the test:
Code:
server1: 11:00:00     11:01:01    11:02:00   11:03:00   11:04:00
              0m0,05s     0m0,08s    0m0,08s   0m0,05s   0m0,05s

server2: 11:00:00    11:01:00    11:02:00   11:03:00   11:04:00
              0m0,08s    0m0,10s    0m0,06s   0m0,08s   0m0,08s

server3:  11:00:00   11:01:00  11:02:00    11:03:00    11:04:00
               0m0,07s  0m0,65s   0m0,27s    0m0,25s   0m0,50s

You can see that the execution time on server3 is much longer that the other 2 and i noticed that this happens at the first 5-6 minutes of each hour.
I am trying to figure out what causes this extra delay during these hours but i cannot find anything. I tried to check the crons to see if there is something automatic that runs during these hours that is causing the delay but i dont think my answer is there.

Any help will be appreciated.
Thank you.
# 2  
Old 01-11-2016
Examine the crontabs! The following command greps the cron jobs that are started at the beginning of an hour.
Code:
awk '/^[^#]/ && $2~/^0*[0-4]$/' /var/spool/cron/crontabs/*


Last edited by MadeInGermany; 01-11-2016 at 01:30 PM..
# 3  
Old 01-11-2016
Quote:
Originally Posted by omonoiatis9
I am trying to figure out what causes this extra delay during these hours but i cannot find anything. I tried to check the crons to see if there is something automatic that runs during these hours that is causing the delay but i dont think my answer is there.
What makes you think the answer is not in the crontabs? (The question is meant serious, what haveyou done to come to that conclusion?)

You might want to start with the basic tool for all things performance: vmstat. Use
Code:
vmstat -tw 1 | tee -a /some/log/file

and analyse the log. See if there is any significant difference between the first 5-6 minutes of an hour and the rest of the time. See if there is a difference between the first 5-6 minutes of the hour on server3 and the other two servers.

I hope this helps.

bakunin
# 4  
Old 01-12-2016
Hello guys,

Thank you for your responses.
Well to answer your question about the crons, the crons on server3 are schedules during the early morning hours and from the crons that are running during working hours i did some test.
For the crons that are running at the last or first minutes of an hour i tried to disable one cron at a time to see if there will be any improvement on the time of the execution. When i see that there was no difference then i enabled that cron again and for the next hour i disabled a different one. I ended up disabling all crons one at a time and i get no improvement.
Thats why i said that probably the answer is not there.
Except if you have any suggestion of a different way to test it.
By the way i followed your suggestion to create a
Code:
vmstat

report. I will let it run for few hours and after that i will examine it.
# 5  
Old 01-13-2016
i let vmstat run for 2 hours and i look at the reports to see the output.
the cpu usage of the server never reaches 100% and also it doesnt seem to have any great variation comparing to the time before and after the delay is experienced.
# 6  
Old 01-15-2016
Quote:
Originally Posted by omonoiatis9
the cpu usage of the server never reaches 100%
That was not the question. If you want to find out yourself what infos you can glean from a vmstat-output you might want to read a little treatise about the topic.

I hope this helps.

bakunin
# 7  
Old 01-22-2016
thank you bakunin.
the link is indeed very useful!
however when i read the reports the server3 which is having the problem with the delay seems healthy (meaning no paging in/out, no block, wait is low)
one of the other servers shows some block from time to time but that server doesnt have any problem in the aspect of sql delay.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To take script execution time

Hello Guys, I would like to know is there a way to take the script execution time For e.g i am having a script.sh i need to write inside he script.sh like Start time : 10-Mar-2016 02:30:35 all code over here ... End time : 10-Mar-2016 03:30:32 Script start time - 02:30:35 ... (7 Replies)
Discussion started by: Master_Mind
7 Replies

2. Homework & Coursework Questions

Parallel execution on multiple servers in UNIX

I have a requirement (in a shell script) to connect to several servers at once and execute a series of commands. I am aware that ssh can be used for sequential execution. But since most of the commands that I need to execute take a long time, I have to go for the parallel option. Is there... (2 Replies)
Discussion started by: sneha1887
2 Replies

3. Solaris

Remote execution of a local script on multiple servers

So I have a scriptlet called solaris_command: for i in \ server1 server2 server3 do echo $i ssh $i $1 echo "" done I then use that as a command in multiple scripts to allow for data gathering for all virtual hosts in the environment thusly: solaris_command "cat... (3 Replies)
Discussion started by: os2mac
3 Replies

4. UNIX for Dummies Questions & Answers

time taken for execution

how much time a particular command or shell script executed there is any command to know this thanks (5 Replies)
Discussion started by: tsurendra
5 Replies

5. HP-UX

Automatic execution of commands in multiple servers using single script.

Hi, I've to do a simple job many times whenever it has been asked, just i've to log in to all of fourtien HP servers and i've to execute ps -fu user > temp cat temp|sendmail "xyz@z.com" commands to send the statics of all of 14 servers over the mail to particular user id.. Though logging... (4 Replies)
Discussion started by: vickramshetty
4 Replies

6. Shell Programming and Scripting

To reduce execution time

Hi All, The below script I run daily and it consumes 2 hours approx. In this I am calling another script and executing the same twice. Is the loop below the cause for the slow process?Is it possible to finetune the program so that it runs in a much faster way? The first script: #!/bin/ksh... (4 Replies)
Discussion started by: Sreejith_VK
4 Replies

7. UNIX for Advanced & Expert Users

specifying an execution time

Hi all, do ny o u'll know how to set a particular execution time for a program??? for eg.: --> during the execution of a file, i call a certain other function. --> while calling this function, my comp hangs. now is there ny way in which i can go to the nxt line of code by aborting the call... (7 Replies)
Discussion started by: VGR
7 Replies

8. UNIX for Dummies Questions & Answers

last execution time

is there a command in Solaris 8 that will show a particular scripts last execution time? (1 Reply)
Discussion started by: cubs0729
1 Replies

9. Programming

execution time

hi , i ve coded a C program in that im using malloc dynamically , it is being called many times in the program The program is to simulate jobs in manufacturing system. the execution time is increasing drastically as the number of jobs are increased. could any body tel what may be the problem... (2 Replies)
Discussion started by: ramki_rk
2 Replies

10. Shell Programming and Scripting

Check query execution to go further

Can any one help with script (Korn) to do following ? :confused: I have 3 tasks to do in a shell. Task (1) is executing query which unloads the result into file XYZ. Before I start Task (2) which is java program and depends on file XYZ, I need to make sure that Task (1) is completed... (1 Reply)
Discussion started by: cub
1 Replies
Login or Register to Ask a Question