Very slow SmartClient performance when used via the Internet

Hi all,

Our SmartClient solution is working fine when accessed within the network. However, when accessing it over the Internet, the performance is terrible (loading a simple form which displays 5 records takes 30+ seconds).

The Internet connection of the application server is T1 (1.5 MB upload and download speed), the client connections which we have tested with were ADSL and cable connections with 4+MB download 0.4+ MB upload with a reasonable latency of less than 80ms - in other words, very decent connections on both sides. At this point the application server is not using SSL but is behind a proxy server.

What could be causing such poor performance? The database is not an issue - all query times are minimal and there are not that many database hits. The tests are done with just 1 or 2 concurrent test user sessions and there were no locks. Is there any way to determine where the bottleneck is or what the major issues are? Profiling the application in Servoy Developer does not reveal anything abnormal and the application works just fine.

Any hints or clues on what we should look at next will be more than welcome. Any suggestions for available tools or techniques for troubleshooting “live” Servoy deployed solutions will be greatly appreciated.

Thanks in advance for your help.
Rossen

do you use the http tunnel?
if so can you add these 2 properties in the sytem properties config area:

system.property.com.sebster.tunnel.http.client.closeRequestOnFlush=false
system.property.com.sebster.tunnel.http.client.chunked=false

The application server is configured using the default settings - I believe that http tunneling of RMI is on by default (at least the two-way socket option is checked).

I added the specified config settings to the system properties section configuration area of the application server in the admin page and then restarted the application server. There is no noticeable difference in the smart client performance when accessing it over the Internet.

Do we need to turn off RMI tunneling?

if you didnt set the SocketFactory.rmiServerFactory in the network settings admin page then you dont use http tunneling
you could try to fill it in to see if rmi over http has better performance.

Do you have a url to the client that i could test?

Forgot to mention one specific detail applicable for our solution (not sure if it has any significance for this issue).

We use 3-level form inheritance. We have a base form which is not based on a table and contain most of the generic code. After that, the application forms extend this base form and add the specific business logic but they have no UI and at runtime a third-level form extends the application business logic form adding the necessary UI - thus, the form inheritance is base_form → application logic form → client UI form.

I would expect that this architecture should not add such significant performance penalty (especially since the application works fine while used within the local network)

that shouldnt matter, at runtime it is pretty much flattened as one thing.

I entered for the SocketFactory the value: com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory and restarted again the application server - again no visible difference

rossent:
Our SmartClient solution is working fine when accessed within the network. However, when accessing it over the Internet, the performance is terrible (loading a simple form which displays 5 records takes 30+ seconds).

Tons of variables when it comes to client speed. Full discussion:

http://www.servoy.com/forum/viewtopic.p … =15#p65469

rossent :

  • which Servoy version are you using ?

  • did you test a local client go thru the proxy ?

  • did you test a remote client bypass the proxy ?

  • is there any noticeable difference in hardware and/or software between local and remote PCs ?

We are using the latest version - Servoy 5.0.1 build 861
Local clients using the proxy work fine - we have tested a scenario with remote clients bypassing the proxy, but the server in that case did not have a comparable internet connection so the lag in response times was kind of expected.
The “hardware” is quite comparable - almost everything is running Window OS, the test servers are virtual running on VMWare Server but with adequate resources.

I am looking into the queries which are being fired when loading the forms. There are usually 12 to 18 queries being fired, more than half of them with 0ms execution time, none of them with more than 40ms - the average is about 10-15ms with a total time of all queries of about 170ms. We load the forms with empty foundsets but probably should look at reducing the “chatter” on the wire…

if there really are more.then 12 queries done per form then thats the problem when working remote. becausof the latency for example the latency per call is for me to the states at least 170ms if that is one or 2 calls that doesnt matter but if that is 12 then it is 12*170 thats 2 seconds only to the latency and that is what i guess you see at your solution

if you use related foundsets as much as possible then we combine queries and cache the results as much as possible but if you use custom queries for showing forms then those wont be cached and will be called over and over again