Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

流量大服务容易异常退出 #44

Open
lihaiz opened this issue Feb 21, 2025 · 10 comments
Open

流量大服务容易异常退出 #44

lihaiz opened this issue Feb 21, 2025 · 10 comments
Labels
bug Something isn't working

Comments

@lihaiz
Copy link

lihaiz commented Feb 21, 2025

已经缓存了model,当其他机器download时,因是本地网络,速度比较快,会olah服务容易异常退出

@jstzwj
Copy link
Contributor

jstzwj commented Feb 22, 2025

方便把具体的异常报错信息贴一下吗

@lihaiz
Copy link
Author

lihaiz commented Feb 24, 2025

找到问题了,不是因为大流量的原因,是快速下载的时候,olah 进程内存爆涨,导致oom了,把内存吃光就闪退了。
经过几台机持续下载测试,olah 内存会涨到很高,128G内存都被使用完,直到内存不够最后oom

@jstzwj
Copy link
Contributor

jstzwj commented Feb 24, 2025

好的,看来确实有内存泄露的问题,之前也有人报告过,我近期查一下

@jstzwj jstzwj added the bug Something isn't working label Feb 24, 2025
@jstzwj
Copy link
Contributor

jstzwj commented Feb 24, 2025

看了下,可能是文件块的读缓存没有释放,刚刚在dev分支修复了。可以安装dev分支试一下,如果没问题我就合进main分支了。

@lihaiz
Copy link
Author

lihaiz commented Feb 25, 2025

安装了dev分支,刚刚简单做了一个测试,内存不再暴涨了。还出现了其他问题:
1、下载了一些大模型时(已经cache了unsloth/DeepSeek-R1-GGUF),当内存cache 占满后,olah 也会死,这个时候访问 http://127.0.0.1:8090 不通
2、当客户端下载模型期间,客户端强行中止下载,olah 的cpu占用率还是保存当时状态,内存的cache还在增长,估计是olah还在不断读取文件;并且olah死掉,访问 http://127.0.0.1:8090 不通

问题1 补充说明,及时清理内存cache,没遇到olah 死掉问题

@jstzwj
Copy link
Contributor

jstzwj commented Feb 25, 2025

请问内存cache指的是什么,是缓存的那个文件夹吗?

@lihaiz
Copy link
Author

lihaiz commented Feb 25, 2025

使用free -m 命令查看linux 内存使用量,有一个cache,这个cache是linux的工作机制,把文件缓存到内存中

@lihaiz
Copy link
Author

lihaiz commented Feb 25, 2025

目前测试情况看,问题2比较严重点

@jstzwj
Copy link
Contributor

jstzwj commented Feb 25, 2025

感觉得优先解决cache满的情况,猜测原因可能是流量过大,模型远超内存大小。在内存占满后,cache内存在释放回写磁盘的时候卡住。
猜测可以观察到卡住的时候可以观察到大量的磁盘的读写。

目前打算在读写文件块的时候绕开cache直接读写,防止写入cache。

@lihaiz
Copy link
Author

lihaiz commented Feb 25, 2025

目前打算在读写文件块的时候绕开cache直接读写,防止写入cache 这个是linux 的工作机制,当有读文件操作的时候就会产生,这个问题倒是可以通过清理cache缓解,客户端在下载的时候,强行按中止,引起服务端卡死这个问题感觉严重点,也有可能你解决了占用cache 的问题也会解决问题2,因为客户端强行中止后,server端还是在读取文件,端口服务已经死了还在读取

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants