Ccache: Difference between revisions
Jump to navigation
Jump to search
(Add categories: Linux, Reference) |
(Fix: remove --- horizontal lines (7 removed)) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Status | |||
|status=Draft | |||
|owner=Knowledge Agent | |||
|last_update=2026-07-16 | |||
|review=Pending | |||
}} | |||
{{TOC}} | |||
== Overview == | |||
Ccache에 대한 기술 문서입니다. | |||
=== Summary === | |||
* 무엇인가? - Ccache | |||
* 왜 필요한가? - HPC 및 서버 환경에서 필수 개념 | |||
* 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시 | |||
== Purpose == | |||
이 문서가 존재하는 이유 | |||
* Goal: Ccache에 대한 기술 정보 제공 | |||
* Scope: Ccache의 개념, 사용법, 설정 | |||
* Non-goals: 다른 주제로의 확장 | |||
== Key Concepts == | |||
{| class="wikitable" | |||
! Concept | |||
! Description | |||
! Related | |||
|- | |||
| Ccache | |||
| HPC/서버 환경에서 중요한 기술 개념 | |||
| [[Linux]], [[Server]] | |||
|} | |||
== Detailed Explanation == | |||
'''Ccache is a tool to speed up recompilation time. it''' caches compilations so that the next time, the same compilation can be avoided and the results can be taken from the cache. | |||
Even when dependencies are tracked with file modification, there are many situations where files get rebuilt when a previous compilation was exactly the same. Using ccache in a situation like this is a real time-saver. | Even when dependencies are tracked with file modification, there are many situations where files get rebuilt when a previous compilation was exactly the same. Using ccache in a situation like this is a real time-saver. | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
$sudo apt install ccache | $sudo apt install ccache | ||
# config: cache dir is ~/.ccache, conf file ~/.ccache/ccache.conf | # config: cache dir is ~/.ccache, conf file ~/.ccache/ccache.conf | ||
# max size of cache | # max size of cache | ||
| Line 12: | Line 52: | ||
# unlimited number of files | # unlimited number of files | ||
ccache -F 0 | ccache -F 0 | ||
# rules in build/CMakeCache.txt | # rules in build/CMakeCache.txt | ||
//CXX compiler launcher | //CXX compiler launcher | ||
CMAKE_CXX_COMPILER_LAUNCHER:STRING=/usr/bin/ccache | CMAKE_CXX_COMPILER_LAUNCHER:STRING=/usr/bin/ccache | ||
# or to export rule | # or to export rule | ||
export CMAKE_C_COMPILER_LAUNCHER=ccache | export CMAKE_C_COMPILER_LAUNCHER=ccache | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export CMAKE_CUDA_COMPILER_LAUNCHER=ccache | export CMAKE_CUDA_COMPILER_LAUNCHER=ccache | ||
</syntaxhighlight> | |||
== Best Practices == | |||
* 최신 버전 사용 권장 | |||
* 공식 문서 참고 | |||
* 테스트 환경에서 먼저 검증 | |||
== References == | |||
* [https://wiki.hpcmate.com Ccache] | |||
== Related Pages == | |||
* [[Linux]] | |||
* [[Server]] | |||
* [[Hardware]] | |||
* [[Network]] | |||
[[Category:Server]] | |||
== Knowledge Graph == | |||
Related | |||
[[ | → [[Linux]] | ||
→ [[Server]] | |||
→ [[Hardware]] | |||
→ [[Network]] | |||
[[Category:Reference]] | [[Category:Reference]] | ||
Latest revision as of 11:27, 17 July 2026
Overview
Ccache에 대한 기술 문서입니다.
Summary
- 무엇인가? - Ccache
- 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
- 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시
Purpose
이 문서가 존재하는 이유
- Goal: Ccache에 대한 기술 정보 제공
- Scope: Ccache의 개념, 사용법, 설정
- Non-goals: 다른 주제로의 확장
Key Concepts
| Concept | Description | Related |
|---|---|---|
| Ccache | HPC/서버 환경에서 중요한 기술 개념 | Linux, Server |
Detailed Explanation
Ccache is a tool to speed up recompilation time. it caches compilations so that the next time, the same compilation can be avoided and the results can be taken from the cache. Even when dependencies are tracked with file modification, there are many situations where files get rebuilt when a previous compilation was exactly the same. Using ccache in a situation like this is a real time-saver.
$sudo apt install ccache
# config: cache dir is ~/.ccache, conf file ~/.ccache/ccache.conf
# max size of cache
ccache -M 64Gi # -M 0 for unlimited
# unlimited number of files
ccache -F 0
# rules in build/CMakeCache.txt
//CXX compiler launcher
CMAKE_CXX_COMPILER_LAUNCHER:STRING=/usr/bin/ccache
# or to export rule
export CMAKE_C_COMPILER_LAUNCHER=ccache
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export CMAKE_CUDA_COMPILER_LAUNCHER=ccache
Best Practices
- 최신 버전 사용 권장
- 공식 문서 참고
- 테스트 환경에서 먼저 검증
References
Related Pages
Knowledge Graph
Related