NUM_KA G_NUM_KA Maximum number of request which can be on an alive connection. G_NUM_KA <min-ka-requests-on-each-connection> < max-ka-requestson-each-connection> keep-alive-pct is the percentage of total connection initiated by NetStorm that it tries to reuse for HTTP Request. Valid values are from 0 to 100. min-ka-requests-on-each-connection is the minimum value of the requests that would be made on a single connection which is remaining as keep alive. max-ka-requests-on-each-connection is the maximum value of the requests that would be made on a single connection which is remaining as keep alive. The Default value of NUM_KA is 0 and 0 . According to this, infinite number of requests can be made per keep alive connection established, and all keep alive connection will be closed when netstorm process is killed. If we given G_NUM_KA value is 5 10 it means netstorm will make 5 to 10 request at per keep alive connections. Average number of keep-alive requests attempted on each Keep-Alive connection by NetStorm will be a random number between min and max. G_KA_PCT G_KA_PCT <group-name> <keep-alive-pct> How many percentage of connections have to be open/reuse? The default value of keep-alive is 100, It means netstorm will keep alive all the connection until all the response has not come, If we give keep alive percentage 0 ,it means no connection will be keep alive & netstorm treats all the connection as “Make Break” type and after getting response it close the connections. Example G_KA_PCT ALL 100 New connection YES KKA? Send Request Send Request Read Request Number of request sent > random min,max YES Close NO Read Request NUM_KA Close Examples Script has 1 Main Url and 8 embedded URLs . Scenario file G_KA_PCT ALL 0 G_NUM_KA ALL 5 5 Total number of connections made will be 9. KA_PCT 0 & NUM_KA is 5, Every URL will make one connection each. So, total number of connections will be 9. Example 2 Scenario file G_KA_PCT ALL 100 G_NUM_KA ALL 0 0 Total number of connections made is 8. Example 3 Scenario file G_KA_PCT 100 G_NUM_KA ALL 1 1 SCHEDULE ALL Duration0 DURATION SESSIONS 1 KA_PCT 100 & NUM_KA is 1, On every connection netstorm will send one request each. So, total number of connections will be 9. Example 4 Scenario file G_KA_PCT ALL 100 G_NUM_KA ALL 1 1 SCHEDULE ALL Duration0 DURATION SESSIONS 2 KA_PCT 100 & NUM_KA is 1, Every Connection netstorm will send one request each. So, total number of connections will be 18. Example 5 Scenario file G_KA_PCT ALL 100 G_NUM_KA ALL 2 2 SCHEDULE ALL Duration0 DURATION SESSIONS 2 KA_PCT 100 & NUM_KA is 2, total number of connections will be 10. In second session, main URL request will be send through the pipe whose NUM_KA is 2, after getting response of main URL NUM_KA will be 1, and then after eight E-URLs requests will be send and when responses for these 8 requests have been received, NUM_KA will become 0. Example 5 Scenario file G_KA_PCT ALL 100 G_NUM_KA ALL 1 5 SCHEDULE ALL Duration0 DURATION SESSIONS 1 KA_PCT 100 & NUM_KA is in range of 1-5 , On every connection netstorm will send request in range of 1 -5. So, total number of connections will be depend upon number of requests being sent. In this case number of connections will be 9. HTTP Pipelining HTTP pipelining is a technique in which multiple HTTP requests are written out to a single socket without waiting for the corresponding responses. Pipelining is only supported in HTTP/1.1, not in 1.0. The pipelining of requests results in a improvement in page loading times, especially over high latency connections. Since it is usually possible to fit several HTTP requests in the same TCP packet, HTTP pipelining allows fewer TCP packets to be sent over the network, reducing network load. Impact On KA_PCT KA_PCT will act on an empty pipe, once the pipe is empty its value will be decreased by one, and when value of NUM_KA will become zero the connection will be closed. Say for example, NUM_KA is 4 4, main URL made a connection and its response received, now pipe is empty NUM_KA value will be decreased to 3 3. Now four more requests will be send and once the pipe will be empty again, NUM_KA will be decreased by one again. Same pattern will be followed till the time NUM_KA value will become zero, once the NUM_KA is 0 connections will be closed. Example 1 Scenario file G_KA_PCT ALL 0 G_NUM_KA ALL 1 1 ENABLE_PIPELINING 1 4 Total number of connections made will be 9. Main URL will make one connection. KA_PCT ALL 0 & NUM_KA is 1; no pipelining will take place. Eight EURL will make one connection each. So, total number of connection will be 9. Example 2 Scenario File G_KA_PCT ALL 100 G_NUM_KA ALL 0 0 ENABLE_PIPELINING 1 4 Number of sessions is 4. Total number of connections made is 5. Explanation…. Main URL has made a connection. Due to pipelining 4 embedded URLs have send requests through the pipe, on the same connection made by the MAIN URL. Since the pipe is full, no more requests can be send through this pipe. For the rest of the embedded URLs parallel fetching will happen. But this should result in only 1 more connection but 4 extra connections were made. This is due to the fact that connect system call mostly returns without a proper connect (INPROGRESS) hence we cannot send anything yet. Hence new connection for each embedded. After first session the only two pipes can be used to send all 4 + 4 connections. So total number of connections made is 1 + 4 = 5. Example 3 Scenario file KA_PCT 100 NUM_KA 4 4 ENABLE_PIPELINING 1 4 SCHEDULE ALL Runtime DURATION SESSIONS 5 Total number of connections made is 5, how? Explanations… Main URL has made a connection, and after its response pipe will become empty and NUM_KA will be decreased by 1, in this case it will be 3. Due to pipelining 4 embedded URLs have send 4 requests through the same pipe, on the same connection made by the MAIN URL, and after receiving its response NUM_KA will be 2 2. In the mean time when 4 requests have been send, the pipe is be full and no more requests can be send through this pipe. For the rest of the embedded URLs parallel fetching will happen. But this should result in only 1 more connection but 4 extra connections were made. This is due to the fact that connect system call mostly returns without a proper connect (INPROGRESS) hence we cannot send anything yet. Hence new connection for each embedded, and NUM_KA will be 3 3 for rest of four connections. In second session, main URL request will be send through any of these 5 Pipes, say main URL request will be send through the pipe whose NUM_KA is 2, after getting response of main URL NUM_KA will be 1, and then after four E-URLs requests will be pipelined and when responses for these 4 requests have been received, NUM_KA will become 0. Rest 4 E-URLs will be pipelined by any of those 4 pipes whose NUM_KA value is 3(In Session 2 only 2 connections are used). So, after getting responses of the entire 4 E-URLs request the NUM_KA value of a particular pipe, whose value previously was 3, will become 2,. So, final values of NUM_KA will be 0, 2, 3, 3, 3. In the same way for the third session, NUM_KA will be 0, 0, 2, 3, and 3. In the 4th session NUM_KA will be 0, 0, 0, 2, and 3. In the 5th session NUM_KA will be 0, 0, 0, 0, and 2. Thanking You
© Copyright 2026 Paperzz