Subversion  튜닝에 대한 자료가 없어서 찾아본 자료를 정리해 본다.

 

httpd 설정 변경

subversion 1.8 부터 사용하는 http library 가 neon 에서 serf 로 변경이 되었다. serf 는 multiplex 와 asynchronous connection 을 사용하므로 httpd의 다음 설정을 변경해 주어야 성능 향상의 효과를 느낄 수 있다.

CentOS 의 apache 설정은 KeepAlive 는 기본적으로 꺼져 있다. 이것을 On 으로 설정하고 최대 KeepAlive Requests 가 100 인데 이 값도 큰 값으로 설정하자.

그리고 프로젝트의 용량이 크거나 네트웍 사정이 좋지 않을 경우 TimeOut 과 KeepAliveTimeout  의 값을 충분히 크게 늘려야 한다.

# Timeout: The number of seconds before receives and sends time out.
Timeout 60
 
# KeepAlive: Whether or not to allow persistent connections (more than one request per connection). Set to "Off" to deactivate.
## KeepAlive Off
KeepAlive On

# MaxKeepAliveRequests: The maximum number of requests to allow during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
## MaxKeepAliveRequests 100
MaxKeepAliveRequests 10000
 
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#KeepAliveTimeout 15
KeepAliveTimeout 60
BASH


공통

 

Disable SVNPathAuthz

Path-based ACL 을 사용하므로 off 로 할수는 없을것 같음

Increase LDAP Cache

현재 LDAP 을 사용하지 않으므로 해당없음

 

Using the FSFS storage method instead of BDB

FSFS 가 BDB보다 안정성이 더 뛰어나나 성능은 차이 없다는 의견이 많음(default 가 FSFS고 현재 모든 repository가 FSFS 로 사용중)

 

svnadmin pack

1.5 이상에서만 제공되는 기능으로 (http://subversion.apache.org/docs/release-notes/1.5.html#fsfs-sharding)  repository 용량이 10% 정도 축소되므로 caching 등에 유리

기존 repository 를 upgrade 해야 할수 있음

svnadmin upgrade REPOS_PATH
svnadmin pack  REPOS_PATH
CODE

mod_dav_svn 대신 svnserve 사용

  • mod_dav_svn 보다 성능 향상이 많다는데 httpd 외 별도의 daemon 을 띄워야 하고 방화벽 오픈, 기존 checkout 한 URL 을 relocate (URL scheme 이 변경됨) 해야 하고 Web 기반 source browsing, Jenkins나 Bamboo 같은 CI 연계 문제가 있어서 패스
  • svn 1.7 부터는 faster HTTP 구현으로 많은 속도향상(http://subversion.tigris.org/issues/show_bug.cgi?id=3371)이 있다고 하니 svnserve 를 쓸 일이 더 더욱 없을것 같음

1.7 이상 가능 기능

  1. 1.7 부터 추가된 MemoryCaching 기능 사용(http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.serverconfig.optimization.caching)
  2. Data Compression 기능 사용(0 - 9 까지 있고 0은 미압축, 9가 최고의 압축율)
<IfModule dav_svn_module>
 # Enable a 1 Gb Subversion data cache for both fulltext and deltas.
        SVNInMemoryCacheSize 1048576
        SVNCacheTextDeltas On
        SVNCacheFullTexts On
        SVNCompressionLevel 5
</IfModule>
BASH

 

See Also

Ref