1 2 3 Previous Next 30 Replies Latest reply: Jul 21, 2011 4:47 AM by jaikiran pai Go to original post RSS
  • 15. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Maxym Pendyshchuk Newbie

    hi Christian, thank you for contributing.

    I also had such an idea, and just tried it a bit. In default\deploy\jbossweb.sar\META-INF I found file jboss-scanning.xml (I never configured it too, so I just looked for an example . Its content:

     

    <scanning xmlns="urn:jboss:scanning:1.0">

    <!-- Purpose:  Disable scanning for annotations in contained deployment. -->

    </scanning>

     

    - looks like just copying this file to our ear package (or war) should stop any scanning (at least I rely on commented hint in that jboss-scanning.xml). After doing that booting time of my server even a bit increased. Well, it can be related to my PC, but if everything was done right, then this issue is really not related to scanning, as Jaikiran Pai mentioned.

     

    On the other hand, to stop AS also takes time (about 1 minute now on my PC with my applications). It removes tmp folder content; when I do it with my hands (just removing that folder), it also takes about 1 minute. A lot of small class files, so it takes time to create/delete those files...

     

    Did you try your application using JBoss 5.x? I migrated from JBoss 4.x so I didn't check, but jboss-scanning.xml firstly arrived there (as far as I know); it probably also means that if your JBoss 5.x boots with your application fine, then again, it is not scanning...

     

    Anyway let us know about your results... This is truely weird issue...

  • 16. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    jaikiran pai Master

    Maxym Pendyshchuk wrote:

     

    On the other hand, to stop AS also takes time (about 1 minute now on my PC with my applications). It removes tmp folder content; when I do it with my hands (just removing that folder), it also takes about 1 minute. A lot of small class files, so it takes time to create/delete those files...

     

    This must be related to https://issues.jboss.org/browse/JBAS-8718

  • 17. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    jaikiran pai Master

    Christian/Maxym,

     

    What does your web.xml look like? I'm mainly interested in the xsd version you use. Try setting the "metadata-complete" attribute in the web-app element of the web.xml to true.

  • 18. Re: JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Christian Kaltepoth Newbie

    Hey all,

     

    thank you very much for your response. No, I didn't try on JBoss 5.x. I tried to directly update from 4.2.2 to 6.0.0!

     

    I did some further testing in the meantime. I think you are right. The slowness seems to be more related to the extracting of JAR files and the extreme number of files in tmp/ than to the annotation scanning.

     

    I did the following experiment. I monitored the number of files in the server/default/tmp/ directory with a simple Linux command:

     

    watch -n 1 "find $JBOSS_HOME/server/default/tmp -type f 2> /dev/null | wc -l"
    

     

    After starting JBoss without any of my applications deployed the number of files is 44. Then I hot-deployed my main EAR file. It consists of one HAR, one SAR, one EJB archive, one very small WAR and about 35 MB of JAR files in the lib/ directory of the EAR. This deployment is more or less fast (about 25 seconds). After the deployment the number of files in the tmp/ directory is 2368.

     

    Then I deployed an additional WAR file with about 26MB of JAR files in WEB-INF/lib/. This deployments takes VERY long time (more than 2 minutes). While the deployment is in progress, the number of files in the tmp/ directory grows to 19.293 files!!!! This seems to slow down the complete system.

     

    Shutting down JBoss also takes very long time. Just after "JMXConnector stopped" you can watch the number of files decreasing. This takes about 2 minutes. Just after the number reaches 0, the server shutdown finally stops.

     

    Christian

  • 19. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    jaikiran pai Master

    Christian Kaltepoth wrote:

     

    Hey all,

     


    After starting JBoss without any of my applications deployed the number of files is 44. Then I hot-deployed my main EAR file. It consists of one HAR, one SAR, one EJB archive, one very small WAR and about 35 MB of JAR files in the lib/ directory of the EAR. This deployment is more or less fast (about 25 seconds). After the deployment the number of files in the tmp/ directory is 2368.

     

    Then I deployed an additional WAR file with about 26MB of JAR files in WEB-INF/lib/. This deployments takes VERY long time (more than 2 minutes). While the deployment is in progress, the number of files in the tmp/ directory grows to 19.293 files!!!! This seems to slow down the complete system.

     

    This doesn't look good. Can you create a separate JBAS JIRA to track this ever growing tmp file size issue?

  • 20. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Christian Kaltepoth Newbie

    Sure! I'll post the link after I have created the issue...

  • 21. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Maxym Pendyshchuk Newbie

    jaikiran pai wrote:

     

    This must be related to https://issues.jboss.org/browse/JBAS-8718

    It is not, when I stop my JBoss, it completely cleans tmp folder. Fortunately I don't have such an issue posted in JIRA by that link. The only way when tmp folder is growing is when I terminate my JBoss (don't allowing it to stop its work and clean files it created at booting time).

  • 22. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Maxym Pendyshchuk Newbie

    Christian Kaltepoth wrote:

     

    Sure! I'll post the link after I have created the issue...

     

    I think you can update mine, because that's the same issue, take a look here, growing count of files is side effect of jars unpacking; so these issues will be related

  • 23. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Christian Kaltepoth Newbie

    Okay, I'll add my observations to your issue report. I just have to find some time to prepare a demo webapp that reproduces this so it is easier to verify!

  • 24. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Christian Kaltepoth Newbie

    Hey there,

     

    I just added my performance test results and a demo web application to JBAS-8886. I hope this helps to get this issue fixed as it makes JBoss 6.0.0 currently unusable for us.

     

    Thank you all for your help

  • 25. Re: JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Christian Kaltepoth Newbie

    Just one last additional note. I found a nice workaround for this issue for Linux servers.

     

    I created an in-memory filesystem (aka ramdisk) and mounted it to the tmp/ folder like this:

     

    sudo mount -t tmpfs -o size=300M tmpfs $JBOSS_HOME/server/default/tmp/
    

     

    Result: The deployment of my demo webapp takes 15 instead of 60 seconds and the shutdown 5 seconds instead of 2 minutes.

  • 26. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Maxym Pendyshchuk Newbie

    hi Christian,

    thank you for job done, I see people related to JBoss AS updated jira, hope they would provide a fix

     

    We also tried ramdisk, we use Windows XP while developing, and here we could copy whole JBoss AS to that ramdisk only (we don't know any way to map a folder to ramdisk there), this way it took some resources... Maybe there is another way, I didn't find any information, but is it possible to tell JBoss that my tmp folder is on another drive? E.g. My JBoss is located in folder H:/servers/JBoss-6.0.0.Final and project therefore is deployed in H:/servers/JBoss-6.0.0.Final/server/default/deploy folder; but using ramdisk (I tried Dataram RAMDisk) I want tmp folder to be there - I:/tmp

     

    My test results so far: I repacked my ear the way when most libraries (jars) are in ear/lib folder, and only 11 are left in war/WEB-INF/lib; after deployment my tmp folder contains 3500 files and:

     

    before (hd drive is using) -      1m 50s to boot JBoss;          26s to stop JBoss

    after (ramdisk) -                     1m 45s to boot JBoss;          7s to stop JBoss

     

    well, good advantage at stopping. Some PCs are slower here, so they will feel ramdisk using; I remember test results done 2 weeks ago and it was 2m with JBoss AS booted from ramdisk against 4m to boot from harddisk), but they can not give so much RAM to work, it will be more helpful if I can create tmp folder out of JBoss folder (if it not possible, then we will buy extra RAM to work)

  • 27. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Peter Johnson Master
    is it possible to tell JBoss that my tmp folder is on another drive?

    Try setting the jboss.server.temp.dir system property. You can set this in run.conf.bat by adding another JAVA_OPTS settings like this:

     

    set JAVA_OPTS = %JAVA_OPTS% -Djboss.server.temp.dir=i:/tmp

     

    You can configure most JBoss AS directory locations using the same mechnism. To see which sys props are available, use the jmx-console and look at the jboss:name=SystemProperties;type=Service mbean

  • 28. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Maxym Pendyshchuk Newbie

    thank you Peter, just tried and it really works (params of set command should be quoted)

  • 29. JBoss 6 Final: unpacking WEB-INF\lib at starting?
    Elias Ross Master

    I created a patched jboss.jar attached to the JIRA you can use.

     

    The fix may not work for all .war files, but works for the example "jarbomb.war" quite well.