mirror of
https://github.com/viq/NewsBlur.git
synced 2025-04-13 09:38:09 +00:00
Adding THP support to redis servers.
This commit is contained in:
parent
5947b284b1
commit
757dda2dda
4 changed files with 12 additions and 5 deletions
|
@ -10,6 +10,7 @@ events {
|
||||||
|
|
||||||
http {
|
http {
|
||||||
access_log /var/log/nginx/access.log;
|
access_log /var/log/nginx/access.log;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
|
||||||
include mime.types;
|
include mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
|
@ -211,7 +211,7 @@ slave-read-only no
|
||||||
# specified for repl-ping-slave-period otherwise a timeout will be detected
|
# specified for repl-ping-slave-period otherwise a timeout will be detected
|
||||||
# every time there is low traffic between the master and the slave.
|
# every time there is low traffic between the master and the slave.
|
||||||
#
|
#
|
||||||
# repl-timeout 60
|
repl-timeout 600
|
||||||
|
|
||||||
# Disable TCP_NODELAY on the slave socket after SYNC?
|
# Disable TCP_NODELAY on the slave socket after SYNC?
|
||||||
#
|
#
|
||||||
|
|
11
fabfile.py
vendored
11
fabfile.py
vendored
|
@ -1094,6 +1094,13 @@ def setup_redis(slave=False):
|
||||||
# sudo('chmod 666 /proc/sys/vm/overcommit_memory', pty=False)
|
# sudo('chmod 666 /proc/sys/vm/overcommit_memory', pty=False)
|
||||||
# run('echo "1" > /proc/sys/vm/overcommit_memory', pty=False)
|
# run('echo "1" > /proc/sys/vm/overcommit_memory', pty=False)
|
||||||
# sudo('chmod 644 /proc/sys/vm/overcommit_memory', pty=False)
|
# sudo('chmod 644 /proc/sys/vm/overcommit_memory', pty=False)
|
||||||
|
sudo('echo "#!/bin/sh -e\n\nif test -f /sys/kernel/mm/transparent_hugepage/enabled; then\n\
|
||||||
|
echo never > /sys/kernel/mm/transparent_hugepage/enabled\n\
|
||||||
|
fi\n\
|
||||||
|
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then\n\
|
||||||
|
echo never > /sys/kernel/mm/transparent_hugepage/defrag\n\
|
||||||
|
fi\n\n\
|
||||||
|
exit 0" | sudo tee /etc/rc.local')
|
||||||
sudo("echo 1 | sudo tee /proc/sys/vm/overcommit_memory")
|
sudo("echo 1 | sudo tee /proc/sys/vm/overcommit_memory")
|
||||||
sudo('echo "vm.overcommit_memory = 1" | sudo tee -a /etc/sysctl.conf')
|
sudo('echo "vm.overcommit_memory = 1" | sudo tee -a /etc/sysctl.conf')
|
||||||
sudo("sysctl vm.overcommit_memory=1")
|
sudo("sysctl vm.overcommit_memory=1")
|
||||||
|
@ -1112,7 +1119,7 @@ def setup_redis(slave=False):
|
||||||
def setup_munin():
|
def setup_munin():
|
||||||
sudo('apt-get update')
|
sudo('apt-get update')
|
||||||
sudo('apt-get install -y munin munin-node munin-plugins-extra spawn-fcgi')
|
sudo('apt-get install -y munin munin-node munin-plugins-extra spawn-fcgi')
|
||||||
# put('config/munin.conf', '/etc/munin/munin.conf', use_sudo=True) # Only on main munin server
|
put('config/munin.conf', '/etc/munin/munin.conf', use_sudo=True)
|
||||||
put('config/spawn_fcgi_munin_graph.conf', '/etc/init.d/spawn_fcgi_munin_graph', use_sudo=True)
|
put('config/spawn_fcgi_munin_graph.conf', '/etc/init.d/spawn_fcgi_munin_graph', use_sudo=True)
|
||||||
put('config/spawn_fcgi_munin_html.conf', '/etc/init.d/spawn_fcgi_munin_html', use_sudo=True)
|
put('config/spawn_fcgi_munin_html.conf', '/etc/init.d/spawn_fcgi_munin_html', use_sudo=True)
|
||||||
sudo('chmod u+x /etc/init.d/spawn_fcgi_munin_graph')
|
sudo('chmod u+x /etc/init.d/spawn_fcgi_munin_graph')
|
||||||
|
@ -1145,7 +1152,7 @@ def copy_munin_data(from_server):
|
||||||
put(os.path.join(env.SECRETS_PATH, 'keys/newsblur.key.pub'), '~/.ssh/newsblur.key.pub')
|
put(os.path.join(env.SECRETS_PATH, 'keys/newsblur.key.pub'), '~/.ssh/newsblur.key.pub')
|
||||||
run('chmod 600 ~/.ssh/newsblur*')
|
run('chmod 600 ~/.ssh/newsblur*')
|
||||||
|
|
||||||
put("config/munin.nginx.conf", "/usr/local/nginx/conf/sites-enabled/munin.conf", use_sudo=True)
|
# put("config/munin.nginx.conf", "/usr/local/nginx/conf/sites-enabled/munin.conf", use_sudo=True)
|
||||||
sudo('/etc/init.d/nginx reload')
|
sudo('/etc/init.d/nginx reload')
|
||||||
|
|
||||||
run("rsync -az -e \"ssh -i /home/sclay/.ssh/newsblur.key\" --stats --progress %s:/var/lib/munin/ /srv/munin" % from_server)
|
run("rsync -az -e \"ssh -i /home/sclay/.ssh/newsblur.key\" --stats --progress %s:/var/lib/munin/ /srv/munin" % from_server)
|
||||||
|
|
|
@ -85,8 +85,7 @@
|
||||||
<img src="/media/img/logo_512.png" class="logo">
|
<img src="/media/img/logo_512.png" class="logo">
|
||||||
<h1>NewsBlur is in <span class="error404">maintenance mode</span></h1>
|
<h1>NewsBlur is in <span class="error404">maintenance mode</span></h1>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<p>Swapping to a different primary Redis to speed things up after today's slowdown due to increased load from the new dashboard river. Should take no more than 30 seconds to complete.</p>
|
<p>Switching to an even bigger Redis server to handle the increased load from the new dashboard river.</p>
|
||||||
<p>If you're wondering, I actually turned on the dashboard river for everybody for the past few weeks to simulate the load. It worked well, so when I flipped the switch I was ready. But I didn't anticipate that people would use the river so much more now, so I just need to boost the Redis box a bit.</p>
|
|
||||||
<p>To pass the time, <a href="http://mlkshk.com/popular">check out what's popular on MLKSHK</a>.</p>
|
<p>To pass the time, <a href="http://mlkshk.com/popular">check out what's popular on MLKSHK</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue