Optimization that can be done to increase Opengrok's performance #4137
Replies: 2 comments 11 replies
-
I can offer some remarks and insights, however most of the work you will have to do yourself (or hire a consultant skilled enough to tackle the problem). There quite a few "details" that you omitted like OpenGrok version, relevant settings (i.e. how the indexer is run), deployment information, relevant operating system details and settings, some information about the overall load (both CPU and I/O) of the system over time, at least some information about the I/O backend and about the CPUs, etc. When searching in multiple projects at once, the search in individual projects happens in parallel. I think that the project for which the search is slowest will determine the overall search time. In general, assuming the I/O backend (by which I mean both memory and disk and anything in between) allows it, the more CPUs are thrown at the problem, the quicker the search will complete (most probably only up to some degree). As for the warm-up, this will only make sense if the amount of memory is enough for the working set. Usually, the Lucene index files will be mapped into memory so will be subject to OS level caching. If the working set, which really is any data the webapp might need (index files, xrefs, history cache data, suggester data, ...) is significantly bigger than the amount of available memory, some cache trashing will follow, meaning the cache warm-up might offer very limited help, if any. Tackling the "Viewing file from search results" time might be good starting point. The webapp offers some metrics, if the webapp log level is increased enough (FINEST), they will also show up in the webapp logs. |
Beta Was this translation helpful? Give feedback.
-
Hey @vladak , its taking really long to open a file in my instance. I don't think that just fetching a file after searching should take such a long time ( 7-9 sec ), even for small files. I have observed another thing in Chrome inspector that two calls are being made for viewing any file, I am attaching the snippet of the two calls and timings. Is this something new added to Opengrok which redirects the request and adds the revision to the request, it takes a lot of time due to this, is there a reason behind this ? Can we remove this ? Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hi, I have approximately 1600 repositories in my Opengrok setup, and having high delays in viewing search results, and viewing a file after searching.
Searching in all repos - 1.2mins
Searching in approx 8 repos - 5s ( common use case )
Viewing file from search results - 6-8s ( this definitely needs to be improved )
Are there some ways we can enhance the speed even further. The above speeds are taken when the cache is warmed up from the previous searches, I restart the instance everyday to have the new indexes for the setup. The current setup has
CPUs - 8
Memory - 64GB
I am not sure what can be done to increase this speeds. One hack I use to have above speeds is to make random calls to opengrok APIs to warm up the cache after restarting the instance. Please suggest any other improvements that can be done. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions