5

I am doing load test on an application that uses Vespa as a database. I have some sample records for which I am doing the test. Now when I run the load test for the first time, Vespa caches the query result which affects our next test scenario results.

Is there a way so that we can disable caching of results for the query for testing purposes and then enable it again.

I am hoping to get the same response time from Vespa after running the same query for the second time.

Even though I have implemented the below code in the services.xml file of our Vespa application. The response time drastically changed for the second time query.

<content id="content" version="1.0">
    <engine>
        <proton>
            <tuning>
                <searchnode>
                    <summary>
                            <store>
                                <cache>
                                    <maxsize>0</maxsize>
                                    <compression>
                                        <type>none</type>
                                    </compression>
                                </cache>
                            </store>
                    </summary>
                </searchnode>
            </tuning>
        </proton>
    </engine>
    ...
</content>
Yash Kasat
  • 203
  • 1
  • 5

1 Answers1

2

Vespa does not cache the query result, and with the summary cache disabled there is no caching at all.

Vespa (like many other databases) takes a while to "warm up" - due to effects like JIT compilation of Java code, OS disk caches, CPU instruction/data caches and so on. You should begin by doing enough queries first that the query latency reaches a steady state.

andreer
  • 331
  • 1
  • 5
  • If Vespa does not cache the result then why we are getting a response time difference for the same query. I get a response in 250ms for a query when run for the first time but the same query gives me the result in 90ms next time. Also, we have run a few 1000 yql requests to Vespa before the above request case. – Yash Kasat Jul 30 '20 at 09:17
  • Vespa has no result oriented caches (query => result) but uses memory mapping of both summary store (The contents of documents) and index files (e.g dictionary and posting lists). – Jo Kristian Bergum Aug 14 '20 at 14:08