Very slow SmartClient performance when used via the Internet

Questions, answers, tips and ideas on Servoy Client

Very slow SmartClient performance when used via the Internet

Postby rossent » Mon Jan 04, 2010 4:50 pm

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
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Very slow SmartClient performance when used via the Internet

Postby jcompagner » Mon Jan 04, 2010 11:12 pm

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
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Very slow SmartClient performance when used via the Internet

Postby rossent » Mon Jan 04, 2010 11:43 pm

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?
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Very slow SmartClient performance when used via the Internet

Postby jcompagner » Mon Jan 04, 2010 11:47 pm

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?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Very slow SmartClient performance when used via the Internet

Postby rossent » Tue Jan 05, 2010 12:00 am

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)
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Very slow SmartClient performance when used via the Internet

Postby jcompagner » Tue Jan 05, 2010 12:09 am

that shouldnt matter, at runtime it is pretty much flattened as one thing.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Very slow SmartClient performance when used via the Internet

Postby rossent » Tue Jan 05, 2010 12:18 am

I entered for the SocketFactory the value: com.servoy.j2db.server.rmi.tunnel.ServerTunnelRMISocketFactoryFactory and restarted again the application server - again no visible difference
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Very slow SmartClient performance when used via the Internet

Postby david » Tue Jan 05, 2010 6:13 am

rossent wrote: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
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Very slow SmartClient performance when used via the Internet

Postby achiary » Tue Jan 05, 2010 7:49 pm

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 ?
achiary
 
Posts: 83
Joined: Wed Nov 14, 2007 3:29 pm
Location: Argentina

Re: Very slow SmartClient performance when used via the Internet

Postby rossent » Tue Jan 05, 2010 10:05 pm

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...
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Very slow SmartClient performance when used via the Internet

Postby jcompagner » Tue Jan 05, 2010 10:35 pm

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
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 10 guests