Improve file-based kernel cache
See original GitHub issue- Often
~/.cupy/kernel_cache
inode becomes very big. I think it’s better to introduce a hierarchy e.g. using the first 2 chars from the cache key:~/.cupy/ab/abXXXXXXXXX....cubin
. - Avoid appending MD5 to a file. The reason this is introduced was to support Windows that needs special care to do atomic rename (https://github.com/cupy/cupy/pull/37/files#r115385936).
os.replace
is in Python 3 so we can just use it now. (FYI, on Windowsos.replace
usesMoveFileExW
withMOVEFILE_REPLACE_EXISTING
flag which can be considered atomic in our usecase; there is a long thread in the forum.) - Include some hint info to filename to manage cache files easily. (maybe NVRTC version and compute capability)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
5 ways to improve hard drive speed in Linux - Dell
2. Bypass PAGE-CACHE for Large Files. ... Consider the case of a reading in a large file (i.e. a database) made of a...
Read more >How to Get More Value From Your File System Directory Cache
This paper identifies several design principles that can substantially improve hit rate and reduce hit cost transparently to applications and file systems.
Read more >Can I configure my Linux system for more aggressive file ...
Improving disk cache performance in general is more than just increasing the file system cache size unless your whole system fits in RAM...
Read more >Improving read performance with dm-cache - Red Hat
Once the cache is populated, the read performance should increase. The Linux kernel file cache generally will perform considerably faster than ...
Read more >File Caching in Distributed File Systems - GeeksforGeeks
Performance improvement of the file system is based on the ... The kernel can store some of the cached files in the disk...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How about adding this tool https://github.com/cupy/cupy/blob/master/.pfnci/trim_cupy_kernel_cache.py to
cupyx/tools
?Also including a CuPy’s major version (‘8’, ‘9’, etc.) to filename may help managing caches.
related? #1890