# HG changeset patch # User Mads Kiilerich # Date 1457968666 -3600 # Node ID 6afa528ee30e0d1abcfbd4dbf8329090cca41ea0 # Parent 5cb780fd494d13bc296d15fc63b35f6af12b6698 db: get rid of vcs_full_cache - it should always be used It might make tests less deterministic, but it makes sure that we test what we actually use. diff -r 5cb780fd494d -r 6afa528ee30e development.ini --- a/development.ini Mon Mar 14 16:17:46 2016 +0100 +++ b/development.ini Mon Mar 14 16:17:46 2016 +0100 @@ -199,9 +199,6 @@ ## cut off limit for large diffs (size in bytes) cut_off_limit = 256000 -## use cache version of scm repo everywhere -vcs_full_cache = true - ## force https in Kallithea, fixes https redirects, assumes it's always https force_https = false diff -r 5cb780fd494d -r 6afa528ee30e docs/usage/performance.rst --- a/docs/usage/performance.rst Mon Mar 14 16:17:46 2016 +0100 +++ b/docs/usage/performance.rst Mon Mar 14 16:17:46 2016 +0100 @@ -9,21 +9,17 @@ amounts of data from version control systems, here are some tips on how to get the best performance. -* Kallithea is often I/O bound, and hence a fast disk (SSD/SAN) is - usually more important than a fast CPU. - -* Sluggish loading of the front page can easily be fixed by grouping repositories or by - increasing cache size (see below). This includes using the lightweight dashboard - option and ``vcs_full_cache`` setting in .ini file. - Follow these few steps to improve performance of Kallithea system. -1. Increase cache +1. Kallithea is often I/O bound, and hence a fast disk (SSD/SAN) is + usually more important than a fast CPU. + +2. Increase cache Tweak beaker cache settings in the ini file. The actual effect of that is questionable. -2. Switch from SQLite to PostgreSQL or MySQL +3. Switch from SQLite to PostgreSQL or MySQL SQLite is a good option when having a small load on the system. But due to locking issues with SQLite, it is not recommended to use it for larger @@ -31,7 +27,7 @@ performance increase. A tool like SQLAlchemyGrate_ can be used for migrating to another database platform. -3. Scale Kallithea horizontally +4. Scale Kallithea horizontally Scaling horizontally can give huge performance benefits when dealing with large amounts of traffic (many users, CI servers, etc.). Kallithea can be diff -r 5cb780fd494d -r 6afa528ee30e kallithea/bin/template.ini.mako --- a/kallithea/bin/template.ini.mako Mon Mar 14 16:17:46 2016 +0100 +++ b/kallithea/bin/template.ini.mako Mon Mar 14 16:17:46 2016 +0100 @@ -196,9 +196,6 @@ <%text>## cut off limit for large diffs (size in bytes) cut_off_limit = 256000 -<%text>## use cache version of scm repo everywhere -vcs_full_cache = true - <%text>## force https in Kallithea, fixes https redirects, assumes it's always https force_https = false diff -r 5cb780fd494d -r 6afa528ee30e kallithea/config/deployment.ini_tmpl --- a/kallithea/config/deployment.ini_tmpl Mon Mar 14 16:17:46 2016 +0100 +++ b/kallithea/config/deployment.ini_tmpl Mon Mar 14 16:17:46 2016 +0100 @@ -192,9 +192,6 @@ ## cut off limit for large diffs (size in bytes) cut_off_limit = 256000 -## use cache version of scm repo everywhere -vcs_full_cache = true - ## force https in Kallithea, fixes https redirects, assumes it's always https force_https = false diff -r 5cb780fd494d -r 6afa528ee30e kallithea/model/db.py --- a/kallithea/model/db.py Mon Mar 14 16:17:46 2016 +0100 +++ b/kallithea/model/db.py Mon Mar 14 16:17:46 2016 +0100 @@ -1439,11 +1439,7 @@ @property def scm_instance(self): - import kallithea - full_cache = str2bool(kallithea.CONFIG.get('vcs_full_cache')) - if full_cache: - return self.scm_instance_cached() - return self.__get_instance() + return self.scm_instance_cached() def scm_instance_cached(self, valid_cache_keys=None): @cache_region('long_term', 'scm_instance_cached') diff -r 5cb780fd494d -r 6afa528ee30e kallithea/tests/test.ini --- a/kallithea/tests/test.ini Mon Mar 14 16:17:46 2016 +0100 +++ b/kallithea/tests/test.ini Mon Mar 14 16:17:46 2016 +0100 @@ -2,7 +2,6 @@ ################################################################################ # Kallithea - config for tests: # # initial_repo_scan = true # -# vcs_full_cache = false # # sqlalchemy and kallithea_test.sqlite # # custom logging # # # @@ -198,10 +197,6 @@ ## cut off limit for large diffs (size in bytes) cut_off_limit = 256000 -## use cache version of scm repo everywhere -#vcs_full_cache = true -vcs_full_cache = false - ## force https in Kallithea, fixes https redirects, assumes it's always https force_https = false diff -r 5cb780fd494d -r 6afa528ee30e scripts/generate-ini.py --- a/scripts/generate-ini.py Mon Mar 14 16:17:46 2016 +0100 +++ b/scripts/generate-ini.py Mon Mar 14 16:17:46 2016 +0100 @@ -40,7 +40,6 @@ ''' Kallithea - config for tests: initial_repo_scan = true - vcs_full_cache = false sqlalchemy and kallithea_test.sqlite custom logging @@ -53,7 +52,6 @@ '[app:main]': { 'initial_repo_scan': 'true', 'app_instance_uuid': 'test', - 'vcs_full_cache': 'false', 'show_revision_number': 'true', 'beaker.cache.sql_cache_short.expire': '1', 'beaker.session.secret': '{74e0cd75-b339-478b-b129-07dd221def1f}',