Show More
@@ -4,43 +4,54 b'' | |||
|
4 | 4 | Optimizing Kallithea performance |
|
5 | 5 | ================================ |
|
6 | 6 | |
|
7 | When serving a large amount of big repositories, Kallithea can start | |
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
|
7 | When serving a large amount of big repositories, Kallithea can start performing | |
|
8 | slower than expected. Because of the demanding nature of handling large amounts | |
|
9 | of data from version control systems, here are some tips on how to get the best | |
|
10 | performance. | |
|
11 | 11 | |
|
12 | Follow these few steps to improve performance of Kallithea system. | |
|
12 | ||
|
13 | Fast storage | |
|
14 | ------------ | |
|
13 | 15 | |
|
14 |
|
|
|
15 |
|
|
|
16 | Kallithea is often I/O bound, and hence a fast disk (SSD/SAN) and plenty of RAM | |
|
17 | is usually more important than a fast CPU. | |
|
16 | 18 | |
|
17 | 2. Increase cache | |
|
19 | ||
|
20 | Caching | |
|
21 | ------- | |
|
18 | 22 | |
|
19 |
|
|
|
20 |
|
|
|
23 | Tweak beaker cache settings in the ini file. The actual effect of that is | |
|
24 | questionable. | |
|
21 | 25 | |
|
22 | 3. Switch from SQLite to PostgreSQL or MySQL | |
|
26 | ||
|
27 | Database | |
|
28 | -------- | |
|
23 | 29 | |
|
24 | 30 |
|
|
25 | 31 |
|
|
26 | deployments. Switching to MySQL or PostgreSQL will result in an immediate | |
|
27 | performance increase. A tool like SQLAlchemyGrate_ can be used for | |
|
28 | migrating to another database platform. | |
|
32 | deployments. | |
|
33 | ||
|
34 | Switching to MySQL or PostgreSQL will result in an immediate performance | |
|
35 | increase. A tool like SQLAlchemyGrate_ can be used for migrating to another | |
|
36 | database platform. | |
|
37 | ||
|
29 | 38 | |
|
30 | 4. Scale Kallithea horizontally | |
|
39 | Horizontal scaling | |
|
40 | ------------------ | |
|
31 | 41 | |
|
32 | Scaling horizontally can give huge performance benefits when dealing with | |
|
33 | large amounts of traffic (many users, CI servers, etc.). Kallithea can be | |
|
34 | scaled horizontally on one (recommended) or multiple machines. | |
|
42 | Scaling horizontally means running several Kallithea instances and let them | |
|
43 | share the load. That can give huge performance benefits when dealing with large | |
|
44 | amounts of traffic (many users, CI servers, etc.). Kallithea can be scaled | |
|
45 | horizontally on one (recommended) or multiple machines. | |
|
35 | 46 | |
|
36 | 47 |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
48 | several HTTP requests are served from the same Python process at once. That can | |
|
49 | in principle give better utilization of internal caches and less process | |
|
50 | overhead. | |
|
40 | 51 | |
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
|
52 | One danger of running multithreaded is that program execution becomes much more | |
|
53 | complex; programs must be written to consider all combinations of events and | |
|
54 | problems might depend on timing and be impossible to reproduce. | |
|
44 | 55 | |
|
45 | 56 |
|
|
46 | 57 |
|
@@ -65,7 +76,9 b' 4. Scale Kallithea horizontally' | |||
|
65 | 76 | that will separate regular user traffic from automated processes like CI |
|
66 | 77 | servers or build bots. |
|
67 | 78 | |
|
68 | 5. Serve static files directly from the web server | |
|
79 | ||
|
80 | Serve static files directly from the web server | |
|
81 | ----------------------------------------------- | |
|
69 | 82 | |
|
70 | 83 | With the default ``static_files`` ini setting, the Kallithea WSGI application |
|
71 | 84 | will take care of serving the static files found in ``kallithea/public`` from |
General Comments 0
You need to be logged in to leave comments.
Login now