1

Does anyone know of ways to optimize the screwturn search functionality? We've been using it for internal documentation, and I'm the tech expert on it, but I have not had the opportunity to analyze it much. After inputting a lot of information into it, we've noticed that text searches take a noticeable delay; on the order of up to 10 seconds in some cases. I'm pasting a screengrab of the search index status here. We have a good 30 different namespaces, which I suspect is more than we really need, but the decision was made to use them for organizational purposes, and I couldn't think of a reason why not. Is it possible the high number of namespaces impacts the search time?

When doing tests on the search, the only resource spike I could find was a big CPU usage spike on the webserver.

Search Index Status screengrab

Adam Miller
  • 767
  • 1
  • 9
  • 22
  • What version of Screwturn wiki are you using? Is this using the standard Search box "{SEARCHBOX}" or the more advanced Search Engine page? If the Search Engine page, what option are you specifying. It may simply be a missing index on the database that would help. – Doug Knudsen Dec 14 '13 at 02:33
  • The wiki version is 3.0.5.600. I've noticed this in both the search box and the search engine page. If I restrict the search to a particular namespace, I noticed it does improve the result time. I thought about the index on the database, but I thought that would impact the processing on the database server, but the CPU spike I was noticing was on the web server (a different machine from the database server). – Adam Miller Dec 16 '13 at 19:52
  • 1
    If you profile the SQL for a single search from your original question, you will likely notice that the web app is very chatty with the database. Having a larger number of namespaces to search will have an impact on search performance due to the way the search is performed (by namespace, from what I have seen, seems very inefficient). After reviewing the code a bit, I can see where you might see a spike on the web server. The best bet would be to refactor the search function to work better with a larger # of namespaces. – Doug Knudsen Dec 18 '13 at 12:34
  • If you post that as an answer, I'll mark it right, as it's the best run-down we have so far. – Adam Miller Dec 31 '13 at 17:24

1 Answers1

1

If you profile the SQL for a single search from your original question, you will likely notice that the web app is very chatty with the database. Having a larger number of namespaces to search will have an impact on search performance due to the way the search is performed (by namespace, from what I have seen, seems very inefficient). After reviewing the code a bit, I can see where you might see a spike on the web server. The best bet would be to refactor the search function to work better with a larger # of namespaces.

Doug Knudsen
  • 935
  • 9
  • 15