You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2010/08/07 02:03:44 UTC
Re: Solr crawls during replication
: We have an index around 25-30G w/ 1 master and 5 slaves. We perform
: replication every 30 mins. During replication the disk I/O obviously shoots up
: on the slaves to the point where all requests routed to that slave take a
: really long time... sometimes to the point of timing out.
:
: Is there any logical or physical changes we could make to our architecture to
: overcome this problem?
If the problem really is disk I/O then perhaps you don't have enough RAM
set asside for the filesystem cache to keep the "current" index in memory?
I've seen people have this type of problem before, but usually it's
network I/O that is the bottleneck, in which case using multiple NICs on
your slaves (one for client requests, one for replication)
I think at one point there was also talk about leveraging an rsync option
to force snappuller to throttle itself an only use a max amount of
bandwidth -- but then we moved away from script based replication to java
based replication and i don't think the Java Network/IO system suports
that type of throttling. However: you might be able to configure it in
your switches/routers (ie: only let the slaves use X% of their total
badwidth to talk to the master)
-Hoss
Re: Solr crawls during replication
Posted by Lance Norskog <go...@gmail.com>.
Yes, the rsync scripts are still there. And they still work fine. It
definitely helps to be a Unix shell wiz.
You would add an option to the rsync call in the scripts that does
rsync throttling.
Rsync is just a standard copying tool in the SSH toolsuite. It's 12
years old and works quite well.
Lance
On Thu, Sep 2, 2010 at 8:31 AM, Mark <st...@gmail.com> wrote:
> On 8/6/10 5:03 PM, Chris Hostetter wrote:
>>
>> : We have an index around 25-30G w/ 1 master and 5 slaves. We perform
>> : replication every 30 mins. During replication the disk I/O obviously
>> shoots up
>> : on the slaves to the point where all requests routed to that slave take
>> a
>> : really long time... sometimes to the point of timing out.
>> :
>> : Is there any logical or physical changes we could make to our
>> architecture to
>> : overcome this problem?
>>
>> If the problem really is disk I/O then perhaps you don't have enough RAM
>> set asside for the filesystem cache to keep the "current" index in memory?
>>
>> I've seen people have this type of problem before, but usually it's
>> network I/O that is the bottleneck, in which case using multiple NICs on
>> your slaves (one for client requests, one for replication)
>>
>> I think at one point there was also talk about leveraging an rsync option
>> to force snappuller to throttle itself an only use a max amount of
>> bandwidth -- but then we moved away from script based replication to java
>> based replication and i don't think the Java Network/IO system suports
>> that type of throttling. However: you might be able to configure it in
>> your switches/routers (ie: only let the slaves use X% of their total
>> badwidth to talk to the master)
>>
>>
>> -Hoss
>>
> Thanks for the suggestions. Our slaves have 12G with 10G dedicated to the
> JVM.. too much?
>
> Are the rysnc snappuller featurs still available in 1.4.1? I may try that to
> see if helps. Configuration of the switches may also be possible.
>
> Also, would you mind explaining your second point... using dual NIC cards.
> How can this be accomplished/configured. Thanks for you help
>
--
Lance Norskog
goksron@gmail.com
Re: Solr crawls during replication
Posted by Shawn Heisey <so...@elyograg.org>.
On 9/3/2010 12:37 PM, Jonathan Rochkind wrote:
> Is the OS disk cache something you configure, or something the OS just does automatically based on available free RAM? Or does it depend on the exact OS? Thinking about the OS disk cache is new to me. Thanks for any tips.
Depends on what you want to configure. If you're referring to the size,
I haven't seen any way to change it, but I haven't really tried to
look. It's pretty much automatic, with the OS using all free RAM as
necessary. If the memory is suddenly required for an application, it
just discards the least used entries from the cache.
Most operating systems will let you tune how likely it is that the OS
will swap application memory out to disk so it can have more RAM for
disk cache. Depending on how that's set, you might actually find your
applications being swapped out to make room for the cache. If that's
happening, things will REALLY slow down.
Linux distributions usually have a default /proc/sys/vm/swappiness
setting of 60%, which despite being pretty high, is perfectly fine for
most workloads when you've got enough memory. If you are not using up
most of your system memory with applications, it'll never touch the
swap. If you're running very tight, you can to adjust that down, but in
the end you just need more memory.
When it comes to BSD or other genetic UNIX systems, I'm in unknown
territory, but as far as I know, they all work about the same.
On Windows, the server products come with the memory settings optimized
for file serving (disk cache), which is awesome for Solr, unless you
don't have enough RAM. The desktop products are optimized for applications.
On most of the free OSes like Linux and the BSDs, the output of the
'free' command will tell you lots of things. Important numbers are
"cached" and the amount of swap currently used. You can also watch
'vmstat 5' and see these values (and a few others) change over time. If
you're on Windows, open the task manager performance tab, resize it up a
ways, and run it for a while.
Thanks,
Shawn
Re: Solr crawls during replication
Posted by Mark <st...@gmail.com>.
On 9/3/10 11:37 AM, Jonathan Rochkind wrote:
> Is the OS disk cache something you configure, or something the OS just does automatically based on available free RAM? Or does it depend on the exact OS? Thinking about the OS disk cache is new to me. Thanks for any tips.
> ________________________________________
> From: Shawn Heisey [solr@elyograg.org]
> Sent: Friday, September 03, 2010 1:46 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Solr crawls during replication
>
> On 9/2/2010 9:31 AM, Mark wrote:
>> Thanks for the suggestions. Our slaves have 12G with 10G dedicated to
>> the JVM.. too much?
>>
>> Are the rysnc snappuller featurs still available in 1.4.1? I may try
>> that to see if helps. Configuration of the switches may also be possible.
>>
>> Also, would you mind explaining your second point... using dual NIC
>> cards. How can this be accomplished/configured. Thanks for you help
> I will first admit that I am a relative newbie at this whole thing, so
> find yourself a grain of salt before you read further ...
>
> While it's probably not a bad idea to change to an rsync method and
> implement bandwidth throttling, I'm betting the real root of your issue
> is that you're low on memory, making your disk cache too small. When
> you do a replication, the simple act of copying the data shoves the
> current index completely out of RAM, so when you do a query, it has to
> go back to the disk (which is now VERY busy) to satisfy it.
>
> Unless you know for sure that you need 10GB dedicated to the JVM, go
> with much smaller values, because out of the 12GB available, that will
> only leave you about 1.5GB, assuming the machine has no GUI and no other
> processes. If you need the JVM that large because you have very large
> Solr caches, consider reducing their size dramatically. In deciding
> whether to use precious memory for the OS disk cache or Solr caches, the
> OS should go first. Additionally, If you have large Solr caches with a
> small disk cache and configure large autowarm counts, you end up with
> extremely long commit times.
>
> I don't know how the 30GB of data in your index is distributed among the
> various Lucene files, but for an index that size, I'd want to have
> between 8GB and 16GB of RAM available to the OS just for disk caching,
> and if more is possible, even better. If you could get more than 32GB
> of RAM in the server, your entire index would fit, and it would be very
> fast.
>
> With a little research, I came up (on my own) with what I think is a
> decent rule of thumb, and I'm curious what the experts think of this
> idea: Find out how much space is taken by the index files with the
> following extensions: fnm, fdx, frq, nrm, tii, tis, and tvx. Think of
> that as a bare minimum disk cache size, then shoot for between 1.5 and 3
> times that value for your disk cache, so it can also cache parts of the
> other files.
>
> Thanks,
> Shawn
>
Ditto on that question
RE: Solr crawls during replication
Posted by Jonathan Rochkind <ro...@jhu.edu>.
Is the OS disk cache something you configure, or something the OS just does automatically based on available free RAM? Or does it depend on the exact OS? Thinking about the OS disk cache is new to me. Thanks for any tips.
________________________________________
From: Shawn Heisey [solr@elyograg.org]
Sent: Friday, September 03, 2010 1:46 PM
To: solr-user@lucene.apache.org
Subject: Re: Solr crawls during replication
On 9/2/2010 9:31 AM, Mark wrote:
> Thanks for the suggestions. Our slaves have 12G with 10G dedicated to
> the JVM.. too much?
>
> Are the rysnc snappuller featurs still available in 1.4.1? I may try
> that to see if helps. Configuration of the switches may also be possible.
>
> Also, would you mind explaining your second point... using dual NIC
> cards. How can this be accomplished/configured. Thanks for you help
I will first admit that I am a relative newbie at this whole thing, so
find yourself a grain of salt before you read further ...
While it's probably not a bad idea to change to an rsync method and
implement bandwidth throttling, I'm betting the real root of your issue
is that you're low on memory, making your disk cache too small. When
you do a replication, the simple act of copying the data shoves the
current index completely out of RAM, so when you do a query, it has to
go back to the disk (which is now VERY busy) to satisfy it.
Unless you know for sure that you need 10GB dedicated to the JVM, go
with much smaller values, because out of the 12GB available, that will
only leave you about 1.5GB, assuming the machine has no GUI and no other
processes. If you need the JVM that large because you have very large
Solr caches, consider reducing their size dramatically. In deciding
whether to use precious memory for the OS disk cache or Solr caches, the
OS should go first. Additionally, If you have large Solr caches with a
small disk cache and configure large autowarm counts, you end up with
extremely long commit times.
I don't know how the 30GB of data in your index is distributed among the
various Lucene files, but for an index that size, I'd want to have
between 8GB and 16GB of RAM available to the OS just for disk caching,
and if more is possible, even better. If you could get more than 32GB
of RAM in the server, your entire index would fit, and it would be very
fast.
With a little research, I came up (on my own) with what I think is a
decent rule of thumb, and I'm curious what the experts think of this
idea: Find out how much space is taken by the index files with the
following extensions: fnm, fdx, frq, nrm, tii, tis, and tvx. Think of
that as a bare minimum disk cache size, then shoot for between 1.5 and 3
times that value for your disk cache, so it can also cache parts of the
other files.
Thanks,
Shawn
Re: Solr crawls during replication
Posted by Shawn Heisey <so...@elyograg.org>.
On 9/2/2010 9:31 AM, Mark wrote:
> Thanks for the suggestions. Our slaves have 12G with 10G dedicated to
> the JVM.. too much?
>
> Are the rysnc snappuller featurs still available in 1.4.1? I may try
> that to see if helps. Configuration of the switches may also be possible.
>
> Also, would you mind explaining your second point... using dual NIC
> cards. How can this be accomplished/configured. Thanks for you help
I will first admit that I am a relative newbie at this whole thing, so
find yourself a grain of salt before you read further ...
While it's probably not a bad idea to change to an rsync method and
implement bandwidth throttling, I'm betting the real root of your issue
is that you're low on memory, making your disk cache too small. When
you do a replication, the simple act of copying the data shoves the
current index completely out of RAM, so when you do a query, it has to
go back to the disk (which is now VERY busy) to satisfy it.
Unless you know for sure that you need 10GB dedicated to the JVM, go
with much smaller values, because out of the 12GB available, that will
only leave you about 1.5GB, assuming the machine has no GUI and no other
processes. If you need the JVM that large because you have very large
Solr caches, consider reducing their size dramatically. In deciding
whether to use precious memory for the OS disk cache or Solr caches, the
OS should go first. Additionally, If you have large Solr caches with a
small disk cache and configure large autowarm counts, you end up with
extremely long commit times.
I don't know how the 30GB of data in your index is distributed among the
various Lucene files, but for an index that size, I'd want to have
between 8GB and 16GB of RAM available to the OS just for disk caching,
and if more is possible, even better. If you could get more than 32GB
of RAM in the server, your entire index would fit, and it would be very
fast.
With a little research, I came up (on my own) with what I think is a
decent rule of thumb, and I'm curious what the experts think of this
idea: Find out how much space is taken by the index files with the
following extensions: fnm, fdx, frq, nrm, tii, tis, and tvx. Think of
that as a bare minimum disk cache size, then shoot for between 1.5 and 3
times that value for your disk cache, so it can also cache parts of the
other files.
Thanks,
Shawn
Re: Solr crawls during replication
Posted by Mark <st...@gmail.com>.
On 8/6/10 5:03 PM, Chris Hostetter wrote:
> : We have an index around 25-30G w/ 1 master and 5 slaves. We perform
> : replication every 30 mins. During replication the disk I/O obviously shoots up
> : on the slaves to the point where all requests routed to that slave take a
> : really long time... sometimes to the point of timing out.
> :
> : Is there any logical or physical changes we could make to our architecture to
> : overcome this problem?
>
> If the problem really is disk I/O then perhaps you don't have enough RAM
> set asside for the filesystem cache to keep the "current" index in memory?
>
> I've seen people have this type of problem before, but usually it's
> network I/O that is the bottleneck, in which case using multiple NICs on
> your slaves (one for client requests, one for replication)
>
> I think at one point there was also talk about leveraging an rsync option
> to force snappuller to throttle itself an only use a max amount of
> bandwidth -- but then we moved away from script based replication to java
> based replication and i don't think the Java Network/IO system suports
> that type of throttling. However: you might be able to configure it in
> your switches/routers (ie: only let the slaves use X% of their total
> badwidth to talk to the master)
>
>
> -Hoss
>
Thanks for the suggestions. Our slaves have 12G with 10G dedicated to
the JVM.. too much?
Are the rysnc snappuller featurs still available in 1.4.1? I may try
that to see if helps. Configuration of the switches may also be possible.
Also, would you mind explaining your second point... using dual NIC
cards. How can this be accomplished/configured. Thanks for you help