Replication and CPU

2010-10-12 Thread Olivier RICARD

Hello,

I setup a server for the replication of Solr. I used 2 cores and for 
each one I specified the replication. I followed the tutorial on 
http://wiki.apache.org/solr/SolrReplication.


The replication is OK for each cores. However the CPU is used to 100% on 
the slave. The master and slave are 2 servers with the same hardware 
configuration. I don't understand which can cause the problem. The slave 
is launched by :



java -Dsolr.solr.home=/solr/multicore -Denable.master=false 
-Denable.slave=true -Xms512m -Xmx1536m -XX:+UseConcMarkSweepGC -jar 
start.jar


If I comment the replication the server is OK.

Anyone have an idea ?

Regards,
Olivier


Re: Replication and CPU

2010-10-12 Thread Peter Karich
Hi Olivier,

maybe the slave replicates after startup? check replication status here:
http://localhost/solr/admin/replication/index.jsp

what is your poll frequency (could you paste the replication part)?

Regards,
Peter.

 Hello,

 I setup a server for the replication of Solr. I used 2 cores and for
 each one I specified the replication. I followed the tutorial on
 http://wiki.apache.org/solr/SolrReplication.

 The replication is OK for each cores. However the CPU is used to 100%
 on the slave. The master and slave are 2 servers with the same
 hardware configuration. I don't understand which can cause the
 problem. The slave is launched by :


 java -Dsolr.solr.home=/solr/multicore -Denable.master=false
 -Denable.slave=true -Xms512m -Xmx1536m -XX:+UseConcMarkSweepGC -jar
 start.jar

 If I comment the replication the server is OK.

 Anyone have an idea ?

 Regards,
 Olivier



-- 
http://jetwick.com twitter search prototype



Re: Replication and CPU

2010-10-12 Thread Olivier RICARD

Hello Peter,

On the slave server http://slave/solr/core0/admin/replication/index.jsp

Poll Interval00:30:00
Local Index Index Version: 1284026488242, Generation: 13102
Location: /solr/multicore/core0/data/index
Size: 26.9 GB
Times Replicated Since Startup: 289
Previous Replication Done At: Tue Oct 12 12:00:00 GMT+02:00 2010
Config Files Replicated At: 1286790818824
Config Files Replicated: [solrconfig_slave.xml]
Times Config Files Replicated Since Startup: 1
Next Replication Cycle At: Tue Oct 12 12:30:00 GMT+02:00 2010

The request Handler on the slave  :
requestHandler name=/replication class=solr.ReplicationHandler 
lst name=slave
str 
name=masterUrlhttp://master/solr/${solr.core.name}/replication/str

str name=pollInterval00:30:00/str
/lst
/requestHandler

I increased the poll interval because I thought that there were too many 
changes. Currently there are no changes on the master and the slave is 
always to 100% of cpu.



On the master, I have

requestHandler name=/replication class=solr.ReplicationHandler 
lst name=master
str name=replicateAfterstartup/str
str name=replicateAftercommit/str
str 
name=confFilessolrconfig_slave.xml:solrconfig.xml,schema.xml,stopwords.txt,elevate.xml,protwords.txt,spellings.txt,synonyms.txt/str

str name=commitReserveDuration00:00:10/str
/lst
/requestHandler

Regards,
Olivier


Le 12/10/2010 12:11, Peter Karich a écrit :

Hi Olivier,

maybe the slave replicates after startup? check replication status here:
http://localhost/solr/admin/replication/index.jsp

what is your poll frequency (could you paste the replication part)?

Regards,
Peter.


Hello,

I setup a server for the replication of Solr. I used 2 cores and for
each one I specified the replication. I followed the tutorial on
http://wiki.apache.org/solr/SolrReplication.

The replication is OK for each cores. However the CPU is used to 100%
on the slave. The master and slave are 2 servers with the same
hardware configuration. I don't understand which can cause the
problem. The slave is launched by :


java -Dsolr.solr.home=/solr/multicore -Denable.master=false
-Denable.slave=true -Xms512m -Xmx1536m -XX:+UseConcMarkSweepGC -jar
start.jar

If I comment the replication the server is OK.

Anyone have an idea ?

Regards,
Olivier








Re: Replication and CPU

2010-10-12 Thread Peter Karich
Hi Olivier,

the index size is relative big and you enabled replication after startup:
str name=replicateAfterstartup/str

This could explain why the slave is replicating from the very beginning.

Are the index versions/generations the same? (via command or
admin/replication)
If not, the slaves tries to replicate and if that fails it will try
again and again.

Are the servers in the same LAN? Maybe replication is just slow?
BTW: CPU usage should be small while replication but peaks nearly after
replication because of autowarming.

Do you have enough free disc space on the slave? (54GB)

To understand what might be the problem comment out the two
replicateAfter statements in the config
+ reload + go to the admin/replication site. There hit 'replicate now'
and see what happens.
Update the UI after some seconds.
(not via F5 I think but via entering the url again + Enter to avoid POST
this again)

If nothing seems to change you'll have an error.
Then look at the logs to investigate this and try the command on master
and slave to better 'debug' replication:
http://slave_host:port/solr/replication?command=details
documented at: http://wiki.apache.org/solr/SolrReplication

Hopes this helps a bit ...

Regards,
Peter.

-- 
http://jetwick.com twitter search prototype