This is a quick impression about the freshly installed Solr 3.5 server.
Enviroment
The base system is a Amazon Microinstance equivalent virtual machine running on a HP Microserver. The VM has 600MB ram and 8GB HDD.
System info & benchmarks
1 2 3 4 5 6 7 8 9 10 |
[root@localhost ~]# cat /proc/cpuinfo processor: 0 model name: AMD Athlon(tm) II Neo N36L Dual-Core Processor stepping: 3cpu MHz: 1297.731 cache size: 1024 KB processor: 1 model name: AMD Athlon(tm) II Neo N36L Dual-Core Processor stepping: 3 cpu MHz: 1297.731 cache size: 1024 KB |
1 2 3 4 |
[root@localhost ~]# hdparm -tT /dev/sda /dev/sda: Timing cached reads: 1810 MB in 2.00 seconds = 904.47 MB/sec Timing buffered disk reads: 140 MB in 3.07 seconds = 45.59 MB/sec |
Solr performance
Full index
The data backend was a Percona MySQL 5.5 server. The indexed database was a webshop with 42k+ items . The full reindex took in average 20-25 secs.
Quick Search
All of the searches finished under 50ms. As a matter of fact 90% of searches was under 30ms. This result was quite impressive. I knew Solr (Lucene) is quick but theoretically it should be slower on a fewer processor with one client. The true strength of Solr is multithreading and parallel processing even under heavy load with more concurrent clients.
Load test
Sawing that results I became curious. If simple query were so quick what would happen under a serious load. So I turned to ab (Apache Benchmark).
Simple query for two keyword. 30 results from 42k set. Apache benchmark results depending on concurrency level.
Concurrency | Request | Time taken (sec) | Request/sec | 95% (ms) |
5 | 500 | 1,176 | 425,31 | 25 |
10 | 500 | 1,338 | 373,83 | 36 |
20 | 500 | 1,589 | 314,67 | 183 |
40 | 500 | 1,543 | 324,09 | 143 |
50 | 500 | 1,355 | 369,07 | 175 |
100 | 500 | 1,398 | 357,72 | 319 |
Conlcusion: even with 100 concurrent threads the 95% of request was served within 319 microseconds which is a very good result for searches even in big clustered systems. The 300+ requests/sec was amazing because this amount of traffic assumes at least 1M unique visitors and above 10M page impressions / day. If a site would be this popular the owner certainly would have the money for more than a micro instance on Amazon Web Services. But it’s good to know that this would be enough.
Recent comments