First, as you can see from the very fast response times for "simpler" 
commands like a STAF ping request, the STAF Local Inter-Process 
Communication (IPC) Connection Provider (which is used when you specify 
"local" or "local://local" for the machine) is very fast (0.0009  seconds) 
-- so communication using the STAF Local IPC Connection Provider is not 
slow.  There are actually a lot of things done by the PROCESS service 
itself under the covers.  In particular, when using the WAIT option, the 
PROCESS service has to be notified when the command that it started is 
complete and access the process completion information.  Generally, the 
command that is run via a STAF PROCESS START request is longer running 
(e.g. a Java application, etc) than a simple "ls" command) so the < than 1 
second time it takes for STAF is insignificant.  Note that if you have a 
lot of simple OS commands like "ls", you may want to put them into a shell 
script and then submit a STAF PROCESS START request to run the shell 
script for faster performance.

When you submit a STAF service request to a remote machine, then you 
specify its TCP/IP host name or IP address and the STAF TCP/IP connection 
provider (either the secure SSL or regular STAF TCP/IP Connection 
Provider) is used which use TCP/IP for communication.  Using STAF to 
communicate between machines is where you start to understand the power of 
STAF.

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:   邓悟 <den...@taobao.com>
To:     Sharon Lucas/Austin/IBM@IBMUS
Cc:     "staf-users@lists.sourceforge.net" 
<staf-users@lists.sourceforge.net>
Date:   07/19/2011 09:20 PM
Subject:        答复: [staf-users] speed issue of staf



Great thanks for Lucas!
 
In our using scenarios, we need to get the string response from staf in 
most cases.  I want to reduce the time for the requests with response 
returned. 
 
In my opinion, the execution time for “ls /” doesn’t take so much time, 
may be most of the time is spent on the communication between staf client 
and staf server. I guess the communication is based on TCP, right?
 
My confusion is that what makes the communication so slow? Any idea to 
refine it?
 
 
 
发件人: Sharon Lucas [mailto:luc...@us.ibm.com] 
发送时间: 2011年7月19日 23:27
收件人: 邓悟
抄送: staf-users@lists.sourceforge.net
主题: Re: [staf-users] speed issue of staf
 
That's because you are submitting a PROCESS START request  using the WAIT 
option so it has to wait for the process to complete.  If you didn't 
specify the WAIT option, you'd see that each PROCESS START request takes 
only 0.007 seconds.  Or, if you specified a simpler request like a STAF 
PING request, it only takes 0.0009 seconds. 

Note:  STAFLoop is an executable we provide that allows you to get some 
performance information on submitting STAF service requests.

[root@staf1e ~]# STAFLoop 10 local PROCESS START SHELL COMMAND "ls /" 
RETURNSTDOUT STDERRTOSTDOUT WAIT 
Total loops: 10 
Total time : 9.723 
Avg. time  : 0.972              <== With the WAIT option, each PROCESS 
START request takes almost 1 second on my Linux machine. 
Loops/sec  : 1.02849 
[root@staf1e ~]# STAFLoop 10 local PROCESS START SHELL COMMAND "ls /" 
RETURNSTD 
OUT STDERRTOSTDOUT 
Total loops: 10 
Total time : 0.075 
Avg. time  : 0.007             <== Without the WAIT option, each PROCESS 
START request only takes 0.007 seconds per PROCESS START request 
Loops/sec  : 133.333 
[root@staf1e ~]# STAFLoop 10 local PING PING 
Total loops: 10 
Total time : 0.009 
Avg. time  : 0.000             <== A simple STAF PING request only takes 
0.0009  seconds (so that 1,111 STAF PING requests can be submitted in 10 
seconds) 
Loops/sec  : 1111.11 
[root@staf1e ~]# STAFLoop 10 local PING PING 

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:        邓悟 <den...@taobao.com> 
To:        "staf-users@lists.sourceforge.net" 
<staf-users@lists.sourceforge.net> 
Date:        07/18/2011 09:45 PM 
Subject:        [staf-users] speed issue of staf 

 

Sorry to interrupt you. 
  
I’m using staf in linux x86_64 platform. A simple request takes about 1 
second each time.  That’s too long to serve a local request. Any one has 
idea? 
  
Command is: 
  
staf local PROCESS START SHELL COMMAND ls /  WAIT RETURNSTDOUT 
STDERRTOSTDOUT 
Response 
-------- 
{ 
  Return Code: 0 
  Key        : <None> 
  Files      : [ 
    { 
      Return Code: 0 
      Data       : bin 
boot 
cache 
dev 
etc 
home 
lib 
lib64 
lost+found 
media 
misc 
mnt 
opt 
proc 
root 
sbin 
selinux 
srv 
sys 
tmp 
usr 
var 
  
    } 
  ] 
} 
 

This email (including any attachments) is confidential and may be legally 
privileged. If you received this email in error, please delete it 
immediately and do not copy it or use it for any purpose or disclose its 
contents to any other person. Thank you.

本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请
您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之
内容。谢谢。
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to