sphinx performance after idle -


i'm writing web application i'm using sphinx search around million documents.

the performance excellent, typical query taking 0.05 seconds, if no queries made few hours, takes longer - 1000x longer couple of queries, returns normal. query log looks this:

[wed mar  7 17:23:55.937 2012] 0.221 sec  [wed mar  7 17:32:00.726 2012] 0.012 sec  [wed mar  7 17:32:00.984 2012] 0.052 sec  [wed mar  7 17:32:01.416 2012] 0.222 sec  [thu mar  8 09:15:10.418 2012] 10.147 sec [thu mar  8 09:16:00.560 2012] 48.262 sec [thu mar  8 09:16:55.429 2012] 54.153 sec [thu mar  8 09:17:54.454 2012] 0.012 sec  [thu mar  8 09:17:54.713 2012] 0.052 sec  [thu mar  8 09:17:55.141 2012] 0.218 sec  

i'm guessing maybe busy server swapping sphinx's memory when unused or something.

how can resolve this?

i considered scripting fake queries every minute seems quite ugly hack.

how fast disks on server?

i imagine due having go disk indexes. once accessed few times, os have cached files.

it might worth considering ssd disk. small ssd disk - big enough sphinxes indexs - relativly cheap nowadays.

if memory swapping, suggests have slow disks. address. can add more memory server? (or put swap partition on newly installed ssd disk :)

btw, find out if swapping happening munin (or cacti etc)


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -