Search code examples
full-text-searchmariadbsphinx

How do I get Sphinx stats?


I am new to Sphinx and want to make it index a 2 million row table (~1.5GB in size). I will use plain indexes.

At the moment, I don't know how much memory should I put in the mem_limit config. My idea is that I could simply keep the default, and then I could see how many results are being swapped (stay in disk) or expired (how frequently used results in memory go to disk).

I'm not sure yet exactly how Sphinx works, anyway, but this is my understanding for now. However, how can I see stats like these, just like we can see the STATS for Memcached?

Having some kind of stats would definitely help me know how to better tune Sphinx for my application.

In case it's relevant, I use MariaDB and PHP on CentOS.


Solution

  • In case its not clear mem_limit is ONLY used by the indexer program. For use during creating the index.

    ... frankly the setting isnt all that critical. Just set it as high as you have available memory.

    It's not applicable to searchd which actually answers queries.

    There is 'SHOW STATUS' command, but it doesnt really have anything about menory http://sphinxsearch.com/docs/current.html#sphinxql-show-status

    ... memory usage (and there are no variables to control it!) can be got from general OS commands. On linux for example, possibly something like memstat