Slow performance without Flush

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Slow performance without Flush

Postby sbutler » Tue Nov 19, 2013 3:00 am

I'm helping a client resolve some performance problems, and have come across an interesting, reproducible, situation that dramatically effects speed. However, I can't figure out what is causing it.

When you run the solution on the server, and perform a simple action, like running a Jasper Foundset based report, the speed is very slow in Smart Client. When I turn on tracing, I see lots of messages such as:
Code: Select all
ExtendableURLClassLoader.getURLs is invoked!

followed by many of these...
Code: Select all
RMI TCP Connection(4)-184.59.123.184-COS: Written 65548 bytes, compressed: 0%

The majority of them are COS, not CIS, although a few CIS.

If you total up the bytes for each of those "Written XXX bytes", its transferring about 4.5 MB to run that report. Note that is just totalling the bytes after the "JasperTrace: Directory: c:/JasperRptFiles" shows in the log file. So thats just the jasper plugin running causing those.

Now for the interesting part. Close the client, go to the Servoy Admin, and Flush all solutions. Open the client again, run the same report on the same record, its 3-5 times faster, and when reviewing the log with tracing on, I can see it is transferring much less data, about 33K.

If I restart the server, it goes back to being slow.

So, on a fresh restart, its slow and repeatedly transferring 4.5 MB to run the report. Flush the solution, and it runs fast and repeatedly transfers 33K. I can repeat this over and over. I've also created new cloud images from scratch on Rackspace, and can repeat the same scenerio from a fresh server, and a fresh build of the repository.

Any ideas? I'm thinking possible some solution corruption, so I'm working through SVN revisions to see if it was better at some point, but I'm getting skeptical about that.

The server is 5.2.16 with Jasper 4.0.0. We've tried Windows Server 2008, and Windows Server 2012 with Java 6 and Java 7 and get same results. The problem is the same across all Smart Clients with various OS's/Java versions.
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
sbutler
Servoy Expert
 
Posts: 759
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Re: Slow performance without Flush

Postby jcompagner » Tue Nov 19, 2013 7:01 pm

ExtendableURLClassLoader.getURLs that means classloading so i guess a lot of stuff for jasper is loaded it (this shouldn't really matter if you do flush or not right?)

That writing has to be that the foundset or something is transferred over from the client to the server

Why that is effected by a flush i don't know, because a flush on the server just means that the solutions on the server are being read in again (and i guess the client also then gets them again)

I guess you mean "restart the client" and everything is back being slow?

But if you really have the same foundset transferred over then i guess somehow the second time, way more stuff is serialized.

What you could try to do is save the foundset to a file (and one should then be 33K) and when it is slow, save it again to a file (that should then be 4.5MB)
if i have both of those files i maybe am able to see what is really inside it.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Slow performance without Flush

Postby sbutler » Tue Nov 19, 2013 7:07 pm

I guess you mean "restart the client" and everything is back being slow?

No, the client makes no difference. Restart the server, and all clients are slow. Shutting down client and reopening doesn't have any effect. Running the same report over and over has no effect (still slow)
Flush the solutions on the server, then open the client, and now its fast.


Its not calling any explicit foundset data to be loaded, other than the foundset that is passed to the report. Then when jasper runs, it seems like its fetching lots of data.


What you could try to do is save the foundset to a file

How would you suggest I do that? In Servoy, the line of code is just the call to Jasper reports plugin. So where would the save happen?
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
sbutler
Servoy Expert
 
Posts: 759
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Re: Slow performance without Flush

Postby jcompagner » Tue Nov 19, 2013 7:26 pm

what is exactly the call that you do?
i don't really know the jasper plugin, but somehow we have to see what is really going over the line.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Slow performance without Flush

Postby sbutler » Tue Nov 19, 2013 7:38 pm

plugins.jasperPluginRMI.runReport(...)

We pass a foundset. That one line if code causes 4.5 MB if data to be transferred. Flush the solutions, run the same report with same foundset, and then it transfers 33 KB of data.
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
sbutler
Servoy Expert
 
Posts: 759
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Re: Slow performance without Flush

Postby jcompagner » Wed Nov 20, 2013 2:52 pm

i checked it and i think you are somewhere in this class/code

https://www.servoyforge.net/projects/se ... unner.java

(there we see 2 times that "JasperTrace: Directory:" trace)
But i have no idea what could cause there that huge upload to the server.

So we need to have a sample for this to see what is happening, so that it can be debugged
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 8 guests

cron