Using The Sun Desktop Access Client For Scalability Testing
By ThinGuy on Aug 06, 2009
Note: The Sun Desktop Access Client is the proper name for what was called the Sun Ray Soft Client. Since this name change took effect after the Early Access 1 code, the commands and file paths will change with EA2/RR. This post will be updated as the changes occur in the product. Notable differences are directory names and executable names between EA1 and what will be the final product. This article is for the code that was available with EA1 hence the directory names of "Scalp" and the binary name "alpclient.exe"
It's possible to use the new Sun Desktop Access Client (SDAC) to make many Sun Ray Connections from a single Windows instance, the trick is to use different connection profiles. This is great for scalability testing of different servers where actually having hundreds of Sun Ray Ultra Thin Clients set up for sizing is impractical. Here's how you do it.
- Install the SDAC on a supported MS Windows Platforms (XP, Vista, Windows 7)
- Run the soft client and choose all the options you'd like to have. I prefer to have the soft client run in a window rather than fullscreen and I also like to constrain the screen to 800x600 so I can see many of the SDAC instances at one time. Once you've set all your options, go ahead and connect to a server, then end your session.
- Now we must go and edit the "default" SDAC profile which contains all the preferences you just set
- XP: Open the file C:\\Documents and Settings\\username\\Application Data\\Sun\\scalp\\default
- Vista\\Windows7: Open the file C:\\Users\\username\\AppData\\Roaming\\Sun\\scalp\\default
- Remove the Line that starts with DSAKey=
- Save the file
- Now we must create a profile for each connection we wish to make
- Open a command prompt and navigate to the directory noted above as determined by which version of MS Windows you are running
- In that window type the following:
FOR /L %i in (0,1,XXX) DO copy default SDAC%i.txt
- Where XXX is the number of unique copies you wish to make
- You will now have XXX uniquely name copies of the default connection profile with no DSA Key info
- Now we want to launch the SDAC from the command line so we can pass the unique profile name to each instance
- From the same command prompt, navigate to C:\\Program Files\\Sun Ray\\alpclient
- Type the following
FOR /L %i in (0,1,XXX) DO alpclient --profile SDAC%i.txt IP/Name_of_Sun_Ray_Server
- Example to launch 50 soft clients to a server at 192.168.7.10:
FOR /L %i in (0,1,50) DO alpclient --profile SDAC%i.txt 192.168.7.10
- As the command executes the SDAC will inject a new random DSA Key into each connection profile and connect to the Sun Ray Server.
- For the sake of this blog, I'm just showing a login screen, but if your Sun Ray Server was configured for Kiosk Mode you could actually run programs automatically in each SDAC Instance. This is particularly useful for windows sizing tests where you can pass a windows user name and password via uttsc and combine that with something like AutoIT to actually simulate real working users.
- Note on the windows sizing link: That blog was done during the days of CAM where users where named utcuXX. Since Kiosk mode (SRSS 4 and greater) the user ids are utkuXX so change the directions accordingly.
- You use different Sun Ray Server administrative commands to view all the new sessions
- The SDAC uses around 15 MB of RAM per instance so size the number of connections you wish to launch according to how much available RAM you have on the MS Windows instance you are launching them from.
- A MS Windows XP instance with 2GB of RAM should be able to launch 100 or so SDAC sessions.
- The beefier the client, the faster the SDAC sessions will start.
- It's helpful to set you task bar to "Group similar taskbar buttons". Right click on your task bar and choose properties to set this.
- The X/Y coordinates on the initial launch will all be the same so the SDAC Windows will all be stacked on top of each other initially. You can arrange them in a tiled or cascaded fashion by right clicking on the Windows Task Bar and choosing the either the Cascade or Tiling options
- If you are using Kiosk Mode for these tests, ensure that you have enough Kiosk users configured. The default is 25 kiosk users and you can extend that using /opt/SUNWkio/bin/kioskuseradm extend -c XXX
- Where XXX is the number of Kiosk users you wish to add