Hi Guys,
I am attempting to diagnose some throughput issues we are having with BaseX, and I was hoping to get some input on a couple of thread blocking issues I am noticing. Please see the Gist ( https://gist.github.com/jerezzprime/7901172) containing the thread dumps for reference. These thread dumps were generated while BaseX was handling a large number of requests produced using Apache Benchmark. All requests were being made against the same URL and the thread dumps were gathered over a 30 second period.
The most common place for threads to be blocking is at org.basex.io.random.TableDiskAccess.read*. The threads are waiting for other threads to finish, since these method calls are synchronized. Is it possible to concurrently read from disk?
Another place threads appear to be blocking is while waiting for the lock to call org.basex.http.RestXqModules.cache (another synchronized method). It seems like this should only be called once to parse the modules, and then all requests afterwards should be retrieved from the cache, but from the thread dumps it appears threads are still re-parsing the xquery modules. Is this expected behavior?
Thanks,
Jeremy