diff options
author | Stevan Radaković <stevan.radakovic@linaro.org> | 2013-03-06 14:53:46 +0800 |
---|---|---|
committer | Stevan Radaković <stevan.radakovic@linaro.org> | 2013-03-06 14:53:46 +0800 |
commit | 9688e4972e71b8923b8da95088ddb8d00d994605 (patch) | |
tree | 9f34e632f0e3e6e5fe0cf3368323c61cd66894a5 | |
parent | 82f3ab7f5d2591c872244d8b63ca6fd35fb8c84f (diff) | |
parent | d6a4f974515dca8b3f703992aec1fb6ecb19cf25 (diff) |
Merge branch 'master' into sync
-rw-r--r-- | HACKING | 32 | ||||
-rw-r--r-- | config/development.ini | 2 | ||||
-rw-r--r-- | config/production.ini | 2 | ||||
-rw-r--r-- | config/rhodecode | 30 | ||||
-rwxr-xr-x | scripts/rhodecode-setup | 2 | ||||
-rw-r--r-- | scripts/rsync-mirror | 37 |
6 files changed, 102 insertions, 3 deletions
@@ -29,6 +29,19 @@ mapped: 1742036K writeable/private: 1090156K shared: 124980K mapped: 2758760K writeable/private: 1090216K shared: 1141648K mapped: 3307952K writeable/private: 1121856K shared: 1611184K +Memory at the beginning: + +mapped: 654168K writeable/private: 97948K shared: 16K + +Readings done with 7 CI jobs running, and while browsing the website on +multiple tabs. + +mapped: 6740572K writeable/private: 5208744K shared: 551248K +mapped: 6757908K writeable/private: 5226660K shared: 551248K +mapped: 6912412K writeable/private: 5392572K shared: 551248K +mapped: 7081752K writeable/private: 5561912K shared: 551248K +mapped: 7290300K writeable/private: 5770460K shared: 551248K + RabbitMQ -------- @@ -56,3 +69,22 @@ Mem: 15339668 1340356 13999312 0 704 27204 Mem: 15339668 1372744 13966924 0 164 27932 -/+ buffers/cache: 1344648 13995020 +Mem: 15339668 13342380 1997288 0 872 3097056 +-/+ buffers/cache: 10244452 5095216 + +Memory before starting any CI jobs, after kernel chaces have been synced and +dropped: + +Mem: 15339668 5613396 9726272 0 852 203456 +-/+ buffers/cache: 5409088 9930580 + +Memory with 7 CI jobs running, and while browsing the website: + +Mem: 15339668 11064988 4274680 0 184 2332424 +-/+ buffers/cache: 8732380 6607288 + +After jobs ran, and with no load on the server: + +Mem: 15339668 7907532 7432136 0 6680 2501044 +-/+ buffers/cache: 5399808 9939860 + diff --git a/config/development.ini b/config/development.ini index 788d214..0b2841e 100644 --- a/config/development.ini +++ b/config/development.ini @@ -25,7 +25,7 @@ prefix = /<your-prefix> use = egg:rhodecode #filter-with = proxy-prefix full_stack = true -static_files = true +static_files = false lang = en cache_dir = %(here)s/data index_dir = %(here)s/data/index diff --git a/config/production.ini b/config/production.ini index a00e5e2..ea6aa39 100644 --- a/config/production.ini +++ b/config/production.ini @@ -41,7 +41,7 @@ prefix = /<your-prefix> use = egg:rhodecode #filter-with = proxy-prefix full_stack = true -static_files = true +static_files = false lang = en cache_dir = /opt/rhodecode/data index_dir = /opt/rhodecode/data/index diff --git a/config/rhodecode b/config/rhodecode index 723ac6a..a13dc61 100644 --- a/config/rhodecode +++ b/config/rhodecode @@ -1,3 +1,33 @@ +AliasMatch ^/images/(.*)$ /home/rhodecode/rhodecode/rhodecode/public/images/$1 +AliasMatch ^/css/(.*)$ /home/rhodecode/rhodecode/rhodecode/public/css/$1 +AliasMatch ^/js/(.*)$ /home/rhodecode/rhodecode/rhodecode/public/js/$1 + +<Location /images > + ProxyPass ! +</Location> + +<Location /css > + ProxyPass ! +</Location> + +<Location /js > + ProxyPass ! +</Location> + +ExpiresActive on +ExpiresDefault "access plus 300 seconds" + +ExpiresByType text/css "access plus 1 day" +ExpiresByType text/javascript "access plus 1 day" +ExpiresByType image/png "access plus 1 month" +ExpiresByType image/jpg "access plus 1 month" +ExpiresByType image/jpeg "access plus 1 month" +ExpiresByType image/x-icon "access plus 1 month" + +<IfModule mod_headers.c> + Header append Cache-Control "public, no-transform" +</IfModule> + <VirtualHost *:80> ServerName XXXX ServerAlias XXXX diff --git a/scripts/rhodecode-setup b/scripts/rhodecode-setup index 2a7014c..b63596c 100755 --- a/scripts/rhodecode-setup +++ b/scripts/rhodecode-setup @@ -84,7 +84,7 @@ RHODECODE_LOG_DIR = "/var/log/rhodecode" # Default websites directory. APACHE_DEFAULT_DIR = "/etc/apache2/sites-available/" # Default modules to enalbe in Apache -APACHE_ENABLE_MODULES = ["proxy", "proxy_http"] +APACHE_ENABLE_MODULES = ["proxy", "proxy_http", "expires", "headers"] # Apache websites to disable. APACHE_DISABLE_SITES = ["default"] diff --git a/scripts/rsync-mirror b/scripts/rsync-mirror new file mode 100644 index 0000000..c432b27 --- /dev/null +++ b/scripts/rsync-mirror @@ -0,0 +1,37 @@ +#!/bin/bash + +RHODECODE_USER=rhodecode +SSH_USER=linaro-rsync +GIT_SERVER=git.linaro.org +LINARO_PRIVATE_REMOTE=/srv/linaro-private.git.linaro.org/ +LANDING_TEAMS_REMOTE=/srv/landing-teams.git.linaro.org/ +PUBLIC_REPO_PATH=/srv/git.linaro.org/git/ +LOCAL_REPO_PATH=/opt/rhodecode/git_repos +PRIVATE_PATH=$LOCAL_REPO_PATH/private +LINARO_PRIVATE_PATH=$PRIVATE_PATH/linaro-private +LANDING_TEAMS_PATH=$PRIVATE_PATH/landing-teams + +if [ ! -d $LINARO_PRIVATE_PATH ] +then + echo "Creating linaro-private directory..." + mkdir -p $LINARO_PRIVATE_PATH +fi +if [ ! -d $LANDING_TEAMS_PATH ] +then + echo "Creating landing-teams directory..." + mkdir -p $LANDING_TEAMS_PATH +fi + +# Sync private repositories, following symlinks and deleting locally. +echo "Rsyncing linaro-private repositories..." +rsync -e "ssh -l $SSH_USER" -r -L -z --compress-level=8 --delete $SSH_USER@$GIT_SERVER:$LINARO_PRIVATE_REMOTE $LINARO_PRIVATE_PATH +echo "Rsyncing landing-teams private repositories..." +rsync -e "ssh -l $SSH_USER" -r -L -z --compress-level=8 --delete $SSH_USER@$GIT_SERVER:$LANDING_TEAMS_REMOTE $LANDING_TEAMS_PATHS + +# Sync normal repositories, following symlinks and deleting locally. +echo "Rsyncing public repositories..." +rsync -e "ssh -l $SSH_USER" -r -L -z --compress-level=8 --delete $SSH_USER@$GIT_SERVER:$PUBLIC_REPO_PATH $LOCAL_REPO_PATH + +echo "Setting directories ownership..." +chown -R $RHODECODE_USER:$RHODECODE_USER $PRIVATE_PATH + |