Show More
@@ -199,9 +199,6 b' app_instance_uuid = development-not-secr' | |||||
199 | ## cut off limit for large diffs (size in bytes) |
|
199 | ## cut off limit for large diffs (size in bytes) | |
200 | cut_off_limit = 256000 |
|
200 | cut_off_limit = 256000 | |
201 |
|
201 | |||
202 | ## use cache version of scm repo everywhere |
|
|||
203 | vcs_full_cache = true |
|
|||
204 |
|
||||
205 | ## force https in Kallithea, fixes https redirects, assumes it's always https |
|
202 | ## force https in Kallithea, fixes https redirects, assumes it's always https | |
206 | force_https = false |
|
203 | force_https = false | |
207 |
|
204 |
@@ -9,21 +9,17 b' performing slower than expected. Because' | |||||
9 | amounts of data from version control systems, here are some tips on how to get |
|
9 | amounts of data from version control systems, here are some tips on how to get | |
10 | the best performance. |
|
10 | the best performance. | |
11 |
|
11 | |||
12 | * Kallithea is often I/O bound, and hence a fast disk (SSD/SAN) is |
|
|||
13 | usually more important than a fast CPU. |
|
|||
14 |
|
||||
15 | * Sluggish loading of the front page can easily be fixed by grouping repositories or by |
|
|||
16 | increasing cache size (see below). This includes using the lightweight dashboard |
|
|||
17 | option and ``vcs_full_cache`` setting in .ini file. |
|
|||
18 |
|
||||
19 | Follow these few steps to improve performance of Kallithea system. |
|
12 | Follow these few steps to improve performance of Kallithea system. | |
20 |
|
13 | |||
21 | 1. Increase cache |
|
14 | 1. Kallithea is often I/O bound, and hence a fast disk (SSD/SAN) is | |
|
15 | usually more important than a fast CPU. | |||
|
16 | ||||
|
17 | 2. Increase cache | |||
22 |
|
18 | |||
23 | Tweak beaker cache settings in the ini file. The actual effect of that |
|
19 | Tweak beaker cache settings in the ini file. The actual effect of that | |
24 | is questionable. |
|
20 | is questionable. | |
25 |
|
21 | |||
26 |
|
|
22 | 3. Switch from SQLite to PostgreSQL or MySQL | |
27 |
|
23 | |||
28 | SQLite is a good option when having a small load on the system. But due to |
|
24 | SQLite is a good option when having a small load on the system. But due to | |
29 | locking issues with SQLite, it is not recommended to use it for larger |
|
25 | locking issues with SQLite, it is not recommended to use it for larger | |
@@ -31,7 +27,7 b' 2. Switch from SQLite to PostgreSQL or M' | |||||
31 | performance increase. A tool like SQLAlchemyGrate_ can be used for |
|
27 | performance increase. A tool like SQLAlchemyGrate_ can be used for | |
32 | migrating to another database platform. |
|
28 | migrating to another database platform. | |
33 |
|
29 | |||
34 |
|
|
30 | 4. Scale Kallithea horizontally | |
35 |
|
31 | |||
36 | Scaling horizontally can give huge performance benefits when dealing with |
|
32 | Scaling horizontally can give huge performance benefits when dealing with | |
37 | large amounts of traffic (many users, CI servers, etc.). Kallithea can be |
|
33 | large amounts of traffic (many users, CI servers, etc.). Kallithea can be |
@@ -196,9 +196,6 b' app_instance_uuid = ${uuid()}' | |||||
196 | <%text>## cut off limit for large diffs (size in bytes)</%text> |
|
196 | <%text>## cut off limit for large diffs (size in bytes)</%text> | |
197 | cut_off_limit = 256000 |
|
197 | cut_off_limit = 256000 | |
198 |
|
198 | |||
199 | <%text>## use cache version of scm repo everywhere</%text> |
|
|||
200 | vcs_full_cache = true |
|
|||
201 |
|
||||
202 | <%text>## force https in Kallithea, fixes https redirects, assumes it's always https</%text> |
|
199 | <%text>## force https in Kallithea, fixes https redirects, assumes it's always https</%text> | |
203 | force_https = false |
|
200 | force_https = false | |
204 |
|
201 |
@@ -192,9 +192,6 b' app_instance_uuid = ${app_instance_uuid}' | |||||
192 | ## cut off limit for large diffs (size in bytes) |
|
192 | ## cut off limit for large diffs (size in bytes) | |
193 | cut_off_limit = 256000 |
|
193 | cut_off_limit = 256000 | |
194 |
|
194 | |||
195 | ## use cache version of scm repo everywhere |
|
|||
196 | vcs_full_cache = true |
|
|||
197 |
|
||||
198 | ## force https in Kallithea, fixes https redirects, assumes it's always https |
|
195 | ## force https in Kallithea, fixes https redirects, assumes it's always https | |
199 | force_https = false |
|
196 | force_https = false | |
200 |
|
197 |
@@ -1439,11 +1439,7 b' class Repository(Base, BaseModel):' | |||||
1439 |
|
1439 | |||
1440 | @property |
|
1440 | @property | |
1441 | def scm_instance(self): |
|
1441 | def scm_instance(self): | |
1442 | import kallithea |
|
1442 | return self.scm_instance_cached() | |
1443 | full_cache = str2bool(kallithea.CONFIG.get('vcs_full_cache')) |
|
|||
1444 | if full_cache: |
|
|||
1445 | return self.scm_instance_cached() |
|
|||
1446 | return self.__get_instance() |
|
|||
1447 |
|
1443 | |||
1448 | def scm_instance_cached(self, valid_cache_keys=None): |
|
1444 | def scm_instance_cached(self, valid_cache_keys=None): | |
1449 | @cache_region('long_term', 'scm_instance_cached') |
|
1445 | @cache_region('long_term', 'scm_instance_cached') |
@@ -2,7 +2,6 b'' | |||||
2 | ################################################################################ |
|
2 | ################################################################################ | |
3 | # Kallithea - config for tests: # |
|
3 | # Kallithea - config for tests: # | |
4 | # initial_repo_scan = true # |
|
4 | # initial_repo_scan = true # | |
5 | # vcs_full_cache = false # |
|
|||
6 | # sqlalchemy and kallithea_test.sqlite # |
|
5 | # sqlalchemy and kallithea_test.sqlite # | |
7 | # custom logging # |
|
6 | # custom logging # | |
8 | # # |
|
7 | # # | |
@@ -198,10 +197,6 b' app_instance_uuid = test' | |||||
198 | ## cut off limit for large diffs (size in bytes) |
|
197 | ## cut off limit for large diffs (size in bytes) | |
199 | cut_off_limit = 256000 |
|
198 | cut_off_limit = 256000 | |
200 |
|
199 | |||
201 | ## use cache version of scm repo everywhere |
|
|||
202 | #vcs_full_cache = true |
|
|||
203 | vcs_full_cache = false |
|
|||
204 |
|
||||
205 | ## force https in Kallithea, fixes https redirects, assumes it's always https |
|
200 | ## force https in Kallithea, fixes https redirects, assumes it's always https | |
206 | force_https = false |
|
201 | force_https = false | |
207 |
|
202 |
@@ -40,7 +40,6 b' ini_files = [' | |||||
40 | ''' |
|
40 | ''' | |
41 | Kallithea - config for tests: |
|
41 | Kallithea - config for tests: | |
42 | initial_repo_scan = true |
|
42 | initial_repo_scan = true | |
43 | vcs_full_cache = false |
|
|||
44 | sqlalchemy and kallithea_test.sqlite |
|
43 | sqlalchemy and kallithea_test.sqlite | |
45 | custom logging |
|
44 | custom logging | |
46 |
|
45 | |||
@@ -53,7 +52,6 b' ini_files = [' | |||||
53 | '[app:main]': { |
|
52 | '[app:main]': { | |
54 | 'initial_repo_scan': 'true', |
|
53 | 'initial_repo_scan': 'true', | |
55 | 'app_instance_uuid': 'test', |
|
54 | 'app_instance_uuid': 'test', | |
56 | 'vcs_full_cache': 'false', |
|
|||
57 | 'show_revision_number': 'true', |
|
55 | 'show_revision_number': 'true', | |
58 | 'beaker.cache.sql_cache_short.expire': '1', |
|
56 | 'beaker.cache.sql_cache_short.expire': '1', | |
59 | 'beaker.session.secret': '{74e0cd75-b339-478b-b129-07dd221def1f}', |
|
57 | 'beaker.session.secret': '{74e0cd75-b339-478b-b129-07dd221def1f}', |
General Comments 0
You need to be logged in to leave comments.
Login now