-
1. Re: VFS Caching Issue - vfs-nested.tmp gets full
alesj Jul 12, 2011 7:35 AM (in response to biswajit.sinha)Can you move to AS6, where we fixed this VFS caching.
(basically we removed it, as it was really a pita)
-
2. Re: VFS Caching Issue - vfs-nested.tmp gets full
biswajit.sinha Jul 12, 2011 7:41 AM (in response to alesj)Ales,
Yes thats the plan but until we move we need to fix this in the current environment.
I was going through the RedHat’s VFS tuning doc and found something but not sure how to use it and needed your help with it. As per RH Support:-
jboss.vfs.cache
Define this class (org.jboss.virtual.spi.cache.helpers.NoopVFSCache) to reuse existing temporary files so that unpacking and wiring does not to be repeated. The VFS registry uses this class definition to keep its existing VFS roots. Every VirtualFile lookup from the VFS class uses this singleton cache instance to check for an existing matching cache entry. Matching also considers any existing ancestor that lets you use the same VirtualFile instance.
My current vfs.xml:-
<?xml version="1.0" encoding="UTF-8"?>
<!--
The JBossVFS initializer configuration.
-->
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<bean name="VFSCache">
<constructor factoryClass="org.jboss.virtual.spi.cache.VFSCacheFactory" factoryMethod="getInstance">
<!-- Use the CombinedVFSCache implementation -->
<parameter>org.jboss.virtual.plugins.cache.CombinedVFSCache</parameter>
</constructor>
<start ignored="true"/>
<property name="permanentRoots">
<map keyClass="java.net.URL" valueClass="org.jboss.virtual.spi.ExceptionHandler">
<entry>
<key>${jboss.lib.url}</key>
<value><null/></value>
</entry>
<entry>
<key>${jboss.common.lib.url}</key>
<value><inject bean="VfsNamesExceptionHandler"/></value>
</entry>
<entry>
<key>${jboss.server.lib.url}</key>
<value><inject bean="VfsNamesExceptionHandler"/></value>
</entry>
<entry>
<key>${jboss.server.home.url}deploy</key>
<value><inject bean="VfsNamesExceptionHandler"/></value>
</entry>
</map>
</property>
<property name="realCache">
<bean class="org.jboss.virtual.plugins.cache.IterableTimedVFSCache"/>
</property>
</bean>
<bean name="VfsNamesExceptionHandler" class="org.jboss.virtual.plugins.context.helpers.NamesExceptionHandler">
<constructor>
<parameter class="java.lang.String">sqljdbc.jar</parameter>
</constructor>
</bean>
</deployment>
Where do I want to use org.jboss.virtual.spi.cache.helpers.NoopVFSCache and what does it do exactly?
Regards,Bis
-
3. Re: VFS Caching Issue - vfs-nested.tmp gets full
biswajit.sinha Jul 12, 2011 12:05 PM (in response to biswajit.sinha)Ales,
Any word on this?
Regards,
Bis
-
4. Re: VFS Caching Issue - vfs-nested.tmp gets full
alesj Jul 12, 2011 12:19 PM (in response to biswajit.sinha)Any word on this?
Busy with AS7 stuff -- released today :-)
But it's on my todo list, so I won't forget,
just cannot promise when, asap I hope.
-
5. Re: VFS Caching Issue - vfs-nested.tmp gets full
biswajit.sinha Jul 12, 2011 12:28 PM (in response to alesj)Thanks for the update. Yes, I saw that. Its ironic as I was planning to try JB 6.0 but you guys have released 7 as well. No problems when you get some time, if you could tell me what do I need to put in my vfs.xml to use org.jboss.virtual.spi.cache.helpers.NoopVFSCache, I will really be grateful.
Regards,
Bis
-
6. Re: VFS Caching Issue - vfs-nested.tmp gets full
alesj Jul 13, 2011 8:55 AM (in response to biswajit.sinha)Where do I want to use org.jboss.virtual.spi.cache.helpers.NoopVFSCache and what does it do exactly?
I don't think you wanna use Noop cache instance (and the docs are probably invalid then).
As this, as the name suggests, does nothing == no-op(eration), it doesn't cache at all.
The current config you posted should be fine.
My guess is you're missing some permanent root.
e.g. the Combined cache has two sub-caches.
1) permanent -- entries never expire (they are removed when undeployed though)
2) temporary -- atm IterableTimedVFSCache is used, which holds this by default for 30min
See "permanentRoots" property and its values.
And then see if all of your monitored deployments fall into this roots.
-
7. Re: VFS Caching Issue - vfs-nested.tmp gets full
biswajit.sinha Jul 13, 2011 9:05 AM (in response to alesj)Ales,
I got this from the RedHat JBoss docs - http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Web_Platform/5/html-single/Administration_And_Configuration_Guide/index.html
jboss.vfs.cache
Define this class (org.jboss.virtual.spi.cache.helpers.NoopVFSCache
) to reuse existing temporary files so that unpacking and wiring does not to be repeated. The VFS registry uses this class definition to keep its existing VFS roots. EveryVirtualFile
lookup from the VFS class uses this singleton cache instance to check for an existing matching cache entry. Matching also considers any existing ancestor that lets you use the sameVirtualFile
instance.Also how to now find out what parmanent root is missing. We are using the deploy directory only for deployments.
Regards,
Bis
-
8. Re: VFS Caching Issue - vfs-nested.tmp gets full
alesj Jul 13, 2011 9:18 AM (in response to biswajit.sinha)I got this from the RedHat JBoss docs - http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Web_Platform/5/html-single/Administration_And_Configuration_Guide/index.html
You also have this later:
"
By default there is no caching in VFS, since
org.jboss.virtual.spi.cache.helpers.NoopVFSCache
is used. You can provide your own cache implementation or choose from existing VFS implementations."
Also how to now find out what parmanent root is missing. We are using the deploy directory only for deployments.
If you're are only using deploy/ then it should already work -- unless there is some hidden bug somewhere.
This is the entry that makes it permanent:
<entry>
<key>${jboss.server.home.url}deploy</key>
<value><inject bean="VfsNamesExceptionHandler"/></value>
</entry>
It could be some external lib that you're referenceing.
Check (debug) which jar keeps getting copied / temped.
-
9. Re: VFS Caching Issue - vfs-nested.tmp gets full
pangea Jul 13, 2011 9:48 AM (in response to alesj)Hi Ales
Thanks for the insight into the VFS Caching so far.
I, like Biswajit, also had an issue whereby the vfs-nested.tmp folder was filling up. I swopped out the default caching for LRUCaching, which overcame the problem.
Since I have started deploying more apps to my app server, the LRU Caching seems not to be ideal, as I eventually get a "Removing an object using a null key" error.
After doing some digging, I swopped the cache out again to use the NoopVFSCache. As suggested above, the documentation put it into a positive light.
So, I really just have two questions, if you could possible help:
1) I gather I should not use NoopVFSCache, or else I will suffer performance degradation?
2) You suggested that all roots need to be defined in the vfs.xml file. Is some of my deploy-able artifacts sit in the farm, should this be added as a root?
Any advise would be much appreciated.
Thanks
Pangea
-
10. Re: VFS Caching Issue - vfs-nested.tmp gets full
alesj Jul 13, 2011 9:56 AM (in response to pangea)1) I gather I should not use NoopVFSCache, or else I will suffer performance degradation?
Yes, this means that there won't be any caching at all.
e.g. direct string url to URL goes over cache, if there is no matching existing instance, it re-packages nested jar again
In the case of Noop there is never one, obviosuly.
2) You suggested that all roots need to be defined in the vfs.xml file. Is some of my deploy-able artifacts sit in the farm, should this be added as a root?
It's actually not the deployments you should out as roots, but its parent dir.
e.g. deploy/ dir is where normal hot-deployable apps live, hence put deploy/ as root
In the case of farming, farm/ should be put as root.
-
11. Re: VFS Caching Issue - vfs-nested.tmp gets full
pangea Jul 13, 2011 9:59 AM (in response to alesj)Thanks for the prompt response Ales.
I suspect then that my problem would be that the farm is not specified as a root.
I will try it out, and report back if it is sorted.
Thanks again
Pangea
-
12. Re: VFS Caching Issue - vfs-nested.tmp gets full
biswajit.sinha Jul 14, 2011 7:55 AM (in response to pangea)Guys, I think by default farm is missing from vfs.xml but I am not sure if you are referring to the same one I am. What I fail to understand in my situation is it was working with the current setup and all of a sudden in the past 2 weeks this has started to happen. I still fail to understand what's triggering this.
Regards,
Bis
-
13. Re: VFS Caching Issue - vfs-nested.tmp gets full
jaikiran Jul 14, 2011 10:04 AM (in response to biswajit.sinha)Biswajit Sinha wrote:
Guys, I think by default farm is missing from vfs.xml but I am not sure if you are referring to the same one I am.
It was a bug https://issues.jboss.org/browse/JBAS-7126
-
14. Re: VFS Caching Issue - vfs-nested.tmp gets full
biswajit.sinha Jul 14, 2011 10:17 AM (in response to jaikiran)I actually did try adding the farm folder but it made no difference. Besides I thought this would be fixed in 5.1 onwards.