NT_TM avatar image
NT_TM asked amichaels edited

What is the maximum number of SSH session that itest can run in parallel?

I have a task where I might have to open multiple SSH sessions (a multiple of 8 like 48,72 etc) in parallel. I wanted to know the feasibility of this approach. How well can itest framework handle this situation - in terms of memory and time.
iTestsession profilesshthreadscommand line (cli)
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

AmeyaB avatar image
AmeyaB answered
iTest shouldn't have any issues on handling multiple sessions all open at the same time. The exact number of sessions you can open will depend on the memory on your system and the amount of heap space you allocate iTest. More memory and more heap space will allow you to open more sessions (limited of course to 4GB for a 32-bit system). Another factor that affects the number of sessions is the extent of response mapping your are asking iTest to do - the more elaborate and complex the response map, the more memory iTest will use - which in turn affects the number of sessions you can open. I suggest starting small, say 8 to 10 sessions, and increasing based on the response and performance you get from your system for those number of sessions.
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

evdb avatar image evdb commented ·
In addition to Ameya's answer; To get around the 4GB memory limitation you can start up multiple instances of iTest, each instance will have a 4GB limit.
0 Likes 0 ·
NT_TM avatar image NT_TM commented ·
Thank you all for your suggestions. I ran sets of 8, 10 , 15, 25, 50 ssh sessions. Itest takes 20-25 minutes to open 50 session in my particular scenario. Bringing down this time is very crucial in my scenario because 25 minutes to set up the ssh session and with the rest of the test steps, one test case itself will take a lot of time. And we have considerable amount of test-cases to run. Do you guys have suggestions as to how you can bring down the initial set up time?
0 Likes 0 ·
amichaels avatar image amichaels ♦ commented ·
You can create a procedure that opens a single session, then runs through the steps. Then call this procedure in a loop, starting each call in a new thread. this will reduce your execution time to something close to the time of a single run through your steps. As a simple example, I created a procedure that opened an ssh session to an OpenBSD VM. It logged in, ran a "who" command, waited 5 seconds, then exited the session. The total execution time for 100 iterations of the loop was around 7 seconds.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.