stress test for glitece s.laptev (sinp-msu team), cern-intas meeting, dubna 26.07.2007
TRANSCRIPT
Stress test for gLiteCE
S.Laptev (SINP-MSU team),
CERN-INTAS meeting,
Dubna 26.07.2007
Stress test for gLiteCE
• Submitting about 100 jobs
• Check results
• Check CPU load
Stress test for gLiteCE
• Standart test from UI is not stress test, CPU load is not enough
• Since glite CE is using BLAH, we can test it directly as well
Stress test for gLiteCE
• BLAH is Batch Local ASCII Helper
• Login to gLiteCE directly and submit job interactively
• Make script for stress
Stress test for gLiteCE• Standart headers
• #!/usr/bin/python• import os• import sys• import fcntl• import select• import time• com = os.environ['GLITE_LOCATION'] + "/bin/blahpd"• arg = len(sys.argv)• if arg !=2: • print "missing namber of job"• sys.exit()• arg = sys.argv[1]• try:• njob = int(arg)• except ValueError:• print "njob mast be integer"• sys.exit()
Stress test for gLiteCERun “interactive” programm• ins, outs = os.popen2(com)set NONBLOCK mode• void = fcntl.fcntl(outs, fcntl.F_SETFL, os.O_NONBLOCK)Run initial BLAH “commands”• ins.write("ASYNC_MODE_ON\n")• ins.write("COMMANDS\n")Prepare Njob jobs, ttt.sh is simple test script• i = 1• while i < njob+1:• jobid = i• name = 'myout' + (len(arg)-len(str(i))) * '0' + str(i)• i = i+1Submitline is BLAH “commands” to submit 1 job• submitline = "BLAH_JOB_SUBMIT "+str(jobid)+ "
[cmd=\"/home/dteam001/ttt.sh\";out=\"/tmp/"+name+"\";gridtype=\"pbs\";]\n"• ins.write(submitline)
Stress test for gLiteCEFix time for job• start_time = time.time()Blah “commands” for check results• ins.write("RESULTS\n")• ins.flush()• p = select.poll()• p.register(outs, select.POLLIN)• loop = TrueWaiting answer• while loop:• l = p.poll(10)• if len(l)==0: continue• for (fd, event) in l:• if fd == outs.fileno() and event == select.POLLIN:• blah_out = outs.read()• blah_out_lines = str.split(blah_out,"\n")• else: • blah_out = 'no'• sys.exit()• for blah_out in blah_out_lines:• blah_out = str.strip(blah_out)• if blah_out == "R":• ins.write("RESULTS\n")• ins.flush()• # print "'"+blah_out+"'"• blah_out_value = str.split(blah_out)• try:• job=int(blah_out_value[0])• delta = time.time() - start_time• njob = njob -1• print "JOB ",job, "is OK ", "delta time = ", delta, "
Stress test for gLiteCE
Finish script• BLAH_OUT:'"+blah_out+"'", "njob ", njob• except:• pass• if njob == 0:• ins.write("QUIT\n")• ins.flush()• print "All job is OK"• loop == False• sys.exit()
Stress test for gLiteCE
CPU load for 100 job is about 60-70%