Hi Pat,

On 18 Nov 2011, at 12:13, Pat Allan wrote:
> What happens if you run searchd manually instead of via the rake task?
> 
>  searchd --config path/to/production.sphinx.conf --nodetach

I patched my Upstart configuration to run searchd directly instead of via 
Rake...it worked perfectly and barely took any CPU at all.

(I also realised that my pid_file location in sphinx.yml was unwriteable; once 
I'd fixed that, Sphinx was able to run.  Maybe that was pinning the CPU?)

When I revert to the Rake method the CPU starts at >95% but declines over 
several minutes.  After 5 minutes my process list looks like:

$ ps wwaux | grep sphinx
rails    31907  0.0  0.1  35636  1240 ?        Ss   11:39   0:00 su - rails -c 
cd /var/www/apps/sparkle/releases/20111118082310; export PORT=5100; export 
RAILS_ENV=production;  bundle exec rake thinking_sphinx:start NODETACH=true >> 
/var/www/apps/sparkle/shared/log/thinking_sphinx-1.log 2>&1
rails    31912  0.0  0.2  19780  2312 ?        S    11:39   0:00 -su -c cd 
/var/www/apps/sparkle/releases/20111118082310; export PORT=5100; export 
RAILS_ENV=production;  bundle exec rake thinking_sphinx:start NODETACH=true >> 
/var/www/apps/sparkle/shared/log/thinking_sphinx-1.log 2>&1
rails    32048  4.8  8.1 285084 83512 ?        Sl   11:39   0:16 ruby 
/var/www/apps/sparkle/shared/bundle/ruby/1.9.1/bin/rake thinking_sphinx:start 
NODETACH=true
rails    32136  0.0  0.0   4144   564 ?        S    11:39   0:00 sh -c 
/usr/local/bin/searchd --pidfile --config 
"/var/www/apps/sparkle/releases/20111118082310/config/production.sphinx.conf" 
--nodetach
rails    32139  0.0  0.4  37828  5040 ?        S    11:39   0:00 
/usr/local/bin/searchd --pidfile --config 
/var/www/apps/sparkle/releases/20111118082310/config/production.sphinx.conf 
--nodetach

So the CPU is down to 4.8%.  Much better than 95% but not as good as bypassing 
Rake altogether.  Speaking of Rake, I wonder why it is still hanging around?

Cheers,
Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to