cancel
Showing results for 
Search instead for 
Did you mean: 

Spring-Webapp in virtualization server extremly slow

steffenk
Champ in-the-making
Champ in-the-making
Hi Everyone,

in a few words: i have dropped a spring webapp that works with webscripts (using "Alfresco Surf" in this case) in my webproject. When starting the virtualization server, it comes very quickly to the point:
AVMHostConfig deployAVMdirectory
From this point on, loading the rest of the webapp takes long time(about 2-3minutes per box). This happens for each and every sandbox. The Webapp itself is 25MB large.

After some profiling with JRAT, i can deliver the following issues:
- Overall startuptime with only one sandbox (that is staging, admin and two preview boxes) took 10 minutes !!
- AVMHostConfig deployAVMdirectory took 50seconds for each and every box
- org.springframework.remoting.rmi.RmiInvocationWrapper_Stub.invoke(), core.io.FileSystemResource.exists() and core.io.support.PathMatchingResourcePatternResolver.doRetrieveMatchingFiles() need about 5 minutes in total.

Having the taskmanager opened, you can see that the alfresco tomcat needs a lot of cpu - while the virtserver does nearly nothing (5-20%). I know that there are some issues virtualizing a spring webapp. But this behaviour is strange to me. Running the Webapp in a standalone tomcat, it takes nearly 5 seconds to come up. Saying it is 20x faster than virtualizing it.

My Questions:
- Is it possible that my spring webapp clashes with the RMI settings of alfresco and the virtserver?
- Why is this whole thing so slow? Even log messages are coming up very slowly in the console.
- What about the I/O performance fo the alfresco repository?? Could this be the limting factor?

Please help me, any ideas would be appreciated

- Steffen

This is my environment:
Win XP 32bit
Core 2 Duo E7200
4GB Ram
running: Alfresco trunk of november 2008
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
- Is it possible that my spring webapp clashes with the RMI settings of alfresco and the virtserver?
No - if there is a clash then either it will either work or not.
- Why is this whole thing so slow? Even log messages are coming up very slowly in the console.
Is your system out of memory or other resource?
- What about the I/O performance fo the alfresco repository?? Could this be the limting factor?
I/O performance should be pretty good.    However if your disk drive is going mad then yes it could have an effect.

Have you checked your network settings, in particular the DNS settings for the virtualisation server.   I once worked on a project where unknown stuff went via satelite and took ages.

Is it an option to deploy to a test server rather than using the virtualisation server?    You may find one or the other approach is faster.

janv
Employee
Employee
Is link validation enabled ? If so, then try disabling it … depending on your version you can either override the linkValidationService bean (and set pollInterval to 0) or in later releases it can also be changed by overriding a repository property (linkvalidation.pollInterval=0).

Regards,
Jan

steffenk
Champ in-the-making
Champ in-the-making
Hi,

thank you both for your support.
Unfortunately linkvalidation.pollInterval was set to 0 already. I even set lazy-init to false and true, without any effect.

However my virtualized alfresco application contains the following libraries: alfresco-core, alfresco-repository, alfresco-share, alfresco-web-client, alfresco-web-framework and alfresco-webscript-framework.

After some further investigations i can deliver the following results:
- copying all the libs from (virtual)WEB-INF/lib wo catalina/work takes 10 seconds per sandbox. I hardcoded this, because we experienced a lot of problems with stale webscripts in our application. The method called is setRepositories().
- The next big time is "wasted" while spring starts loading. While loading the beans and listeners (XMLWebApplicationContext) takes about 50seconds  :shock:

Is there any possibility that the libraries of virt-server and alfresco-server clash? Any timeouts??

regards
-Steffen

steffenk
Champ in-the-making
Champ in-the-making
it's me again.

I did some further investigations and have a few questions now:

- Is it correct that each and every file is loaded via RMI(VIRT-Server <-> Alfresco), even if the V: drive is mapped correctly?
- Is there any limitation (I/O, sleeps, timouts…) in transmitting the files? I've seen, that for example AuthenticationService.validate() is called for every single file in every single sandbox. So i saved the ticket in a local variable and skipped the validate code, once it has been executed. But this only saved about 10secs in total. And, of course) i was not able to view my sandboxes.

Saying that, It is no wonder that loading spring context took so long. because every class is checked/processed by the alfresco server instead of taking it from the V:

Regards
- Steffen