[xwiki-devs] xwiki on tomcat cluster
I read several posts talking about running xwiki in a clustered environment. Is there any information about how to configure oscache for running xwiki in a clustered environment? Has anyone be running xwiki clustered across multiple tomcats successfully? Thanks for any information Glenn Everitt -- View this message in context: http://www.nabble.com/xwiki-on-tomcat-cluster-tp16808231p16808231.html Sent from the XWiki- Dev mailing list archive at Nabble.com.
Not related to tomcat clusters but still could be useful info, apart from the various JIRA issues for clustering. http://orionl.blogspot.com/2007/10/clustering-xwiki.html Shiva Glenn Everitt wrote:
I read several posts talking about running xwiki in a clustered environment. Is there any information about how to configure oscache for running xwiki in a clustered environment? Has anyone be running xwiki clustered across multiple tomcats successfully?
Thanks for any information
Glenn Everitt
-- View this message in context: http://www.nabble.com/xwiki-on-tomcat-cluster-tp16808231p16823774.html Sent from the XWiki- Dev mailing list archive at Nabble.com.
Thanks for the link. I'm looking for information about how to configure existing oscache. I've looked in the oscache.properities and looks like I just uncomment a couple of lines and I'm running clustered. I just thought there would be a wiki page. If I can figure out how to do it I create a page. look like you specify location for cache cache.path=c:\\app\\cache select caching algorhythm cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache Not sure if there is anything else. Thanks again - Glenn Everitt -- View this message in context: http://www.nabble.com/xwiki-on-tomcat-cluster-tp16808231p16850750.html Sent from the XWiki- Dev mailing list archive at Nabble.com.
What exactly would your cache provide over the existing cache mechanisms suggested in http://jira.xwiki.org/jira/browse/XWIKI-2022 amd http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Performances combined with an apache httpd front-end and a load-balanced tomcat setup on multiple hosts? Specifically http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Performances suggests: Mod Expire Configuration vwwwpro-1:~# cat /etc/apache2/conf.d/expires <Location /xwiki/skins/> ExpiresActive on ExpiresDefault "access plus 1 day" </Location> <Location /xwiki/bin/skin/> ExpiresActive on ExpiresDefault "access plus 1 day" </Location> Cache sizes Tune the document cache in xwiki.cfg. The value depends on how much memory you have. The higher the better. A good reasonable value is 1000. xwiki.store.cache.capacity=1000 Rendering cache Some pages are complex to render (they may aggregate outside data for example or do complex and slow queries). For these pages you can add the following to their content to cache them after they are rendered. For example to cache the rendered content for 60 seconds you would add: $context.setCacheDuration(60) -- Niels. http://nielsmayer.com On Thu, Apr 24, 2008 at 7:49 AM, Glenn Everitt <[email protected]> wrote:
Thanks for the link. I'm looking for information about how to configure existing oscache. I've looked in the oscache.properities and looks like I just uncomment a couple of lines and I'm running clustered. I just thought there would be a wiki page. If I can figure out how to do it I create a page.
look like you specify location for cache cache.path=c:\\app\\cache
select caching algorhythm cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache
Not sure if there is anything else.
Thanks again - Glenn Everitt -- View this message in context: http://www.nabble.com/xwiki-on-tomcat-cluster-tp16808231p16850750.html Sent from the XWiki- Dev mailing list archive at Nabble.com.
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Apr 24, 2008, at 4:49 PM, Glenn Everitt wrote:
Thanks for the link. I'm looking for information about how to configure existing oscache. I've looked in the oscache.properities and looks like I just uncomment a couple of lines and I'm running clustered. I just thought there would be a wiki page.
Yes that would be great to add. I don't think lots of people have used this feature of XWiki. I know Ludovic has in the past but I don't know if he remembers the configuration to use... -Vincent
If I can figure out how to do it I create a page.
look like you specify location for cache cache.path=c:\\app\\cache
select caching algorhythm cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache
Not sure if there is anything else.
Thanks again - Glenn Everitt
Seems like there's more issues raised than solutions in the reference Shiva provided http://orionl.blogspot.com/2007/10/clustering-xwiki.html Seems like delving into this too deeply could leave you forked as "they are planning to replace OSCache with something else" ... Comments? Clustering OSCache Now that XWikiDocument objects were shareable, we worked on adding locking to the com.opensymphony.oscache.general.GeneralCacheAdministrator. I added a named lock to all of the methods which got rid of the lock exceptions, but we ran into a deadlock. I didn't really look at the OSCache code very much, so it's entirely possible that we can get tweak on the OSCache config a little to get it to work, but, considering that they use their own hash-based structures internally, I kind of doubt we'll be able to get OSCache to work right without a bit more real effort building a formal Terracotta integration module. Considering that they are planning to replace OSCache with something else, we decided to stop this avenue. I suggested that we replace the OSCache implementation of the XWiki cache with a quick-and-dirty, simple Map based implementation, but, as Vincent pointed out, that would only show Terracotta working. It wouldn't be something they'd want to integrate into their codebase, since it wouldn't have eviction policies or any of the other nice stuff you expect from a cache implementation. We decided, instead, to pause and revisit the clustered cache component when they get to reimplementing their cache in about a month. Next Steps The next steps as I see them are: - Get clustered caching configured when XWiki replaces OSCache with their next implementation. - Get Lucene clustering working. This will probably require making the Directory instance pluggable, so we can use a RAMDirectory when we want it clustered. - Refining the Terracotta configuration to include only what is needed. We used a *..* include; for startup performance, we might want to identify the set of classes that will actually need to be shared and switch to including those. - Tuning - Automated tests. We discussed the possibility of using the test infrastructure that we're building for the Terracotta forge projects. They also have some XWiki clusters that we can test on. Continued success, of course, will require building automated tests and running them in a continuous integration process.
On Apr 24, 2008, at 7:55 PM, Niels Mayer wrote:
Seems like there's more issues raised than solutions in the reference Shiva provided http://orionl.blogspot.com/2007/10/clustering-xwiki.html Seems like delving into this too deeply could leave you forked as "they are planning to replace OSCache with something else" ... Comments?
We'd like to replace it with jboss cache but we haven't found the time yet... there's a patch in jira that needs to be reviewed and adapted. If anyone has an itch to scratch please go ahead :) As Niels said, note that we didn't succeed in clustering xwiki with terracotta in the little time we had but we voluntarily didn't want to spend much time too. This blog was just a very nice report on the session we had with the great Terracotta folks (we had organized a XWiki meet up and they offered to host us with pizzas, drink, office space, etc). How nice is that? :) Right now the working (not tried it myself) solution we offer is with clustered oscache but I don't know the config. Thanks -Vincent
Clustering OSCache
Now that XWikiDocument objects were shareable, we worked on adding locking to the com.opensymphony.oscache.general.GeneralCacheAdministrator. I added a named lock to all of the methods which got rid of the lock exceptions, but we ran into a deadlock. I didn't really look at the OSCache code very much, so it's entirely possible that we can get tweak on the OSCache config a little to get it to work, but, considering that they use their own hash-based structures internally, I kind of doubt we'll be able to get OSCache to work right without a bit more real effort building a formal Terracotta integration module.
Considering that they are planning to replace OSCache with something else, we decided to stop this avenue. I suggested that we replace the OSCache implementation of the XWiki cache with a quick-and-dirty, simple Map based implementation, but, as Vincent pointed out, that would only show Terracotta working. It wouldn't be something they'd want to integrate into their codebase, since it wouldn't have eviction policies or any of the other nice stuff you expect from a cache implementation.
We decided, instead, to pause and revisit the clustered cache component when they get to reimplementing their cache in about a month.
Next Steps
The next steps as I see them are:
- Get clustered caching configured when XWiki replaces OSCache with their next implementation. - Get Lucene clustering working. This will probably require making the Directory instance pluggable, so we can use a RAMDirectory when we want it clustered. - Refining the Terracotta configuration to include only what is needed. We used a *..* include; for startup performance, we might want to identify the set of classes that will actually need to be shared and switch to including those. - Tuning - Automated tests. We discussed the possibility of using the test infrastructure that we're building for the Terracotta forge projects. They also have some XWiki clusters that we can test on. Continued success, of course, will require building automated tests and running them in a continuous integration process.
participants (4)
-
Glenn Everitt -
Niels Mayer -
shivshan -
Vincent Massol