[GH-ISSUE #163] macOS 版本的 goproxy 占用了大量的虚拟内存 #95

Closed
opened 2026-02-27 23:15:25 +03:00 by kerem · 3 comments
Owner

Originally created by @moonfruit on GitHub (Oct 24, 2018).
Original GitHub issue: https://github.com/snail007/goproxy/issues/163

今天无意中发现,我在 macOS 10.14 上启动 goproxy 6.3 后立刻就占用了大量的(532G+)的虚拟内存空间。
但是平常使用中却没有发现有什么异常,硬盘也没有大量占用的迹象。但是其它的应用程序却不会有这种现象,所以我怀疑是不是还是哪里出了问题。
同时我在 CentOS 7.5 上却没有遇到相同的问题。

运行命令:
ps -eO ppid,etime,pmem,rss,vsz | head -1; ps -eO ppid,etime,pmem,rss,vsz | grep goproxy

在 macOS 上运行结果:
image

在 CentOS 上运行结果:
image

Originally created by @moonfruit on GitHub (Oct 24, 2018). Original GitHub issue: https://github.com/snail007/goproxy/issues/163 今天无意中发现,我在 macOS 10.14 上启动 goproxy 6.3 后立刻就占用了大量的(532G+)的虚拟内存空间。 但是平常使用中却没有发现有什么异常,硬盘也没有大量占用的迹象。但是其它的应用程序却不会有这种现象,所以我怀疑是不是还是哪里出了问题。 同时我在 CentOS 7.5 上却没有遇到相同的问题。 运行命令: `ps -eO ppid,etime,pmem,rss,vsz | head -1; ps -eO ppid,etime,pmem,rss,vsz | grep goproxy` 在 macOS 上运行结果: ![image](https://user-images.githubusercontent.com/1070090/47421698-bde7c100-d7b3-11e8-8f73-d6b46866553e.png) 在 CentOS 上运行结果: ![image](https://user-images.githubusercontent.com/1070090/47421861-08693d80-d7b4-11e8-936f-d08b92eaea9c.png)
kerem closed this issue 2026-02-27 23:15:25 +03:00
Author
Owner

@snail007 commented on GitHub (Oct 24, 2018):

不用管虚拟内存,这是go的内存管理机制,对你物理内存没有影响。建议了解相关知识。所有go程序都是如此。

<!-- gh-comment-id:432591412 --> @snail007 commented on GitHub (Oct 24, 2018): 不用管虚拟内存,这是go的内存管理机制,对你物理内存没有影响。建议了解相关知识。所有go程序都是如此。
Author
Owner

@snail007 commented on GitHub (Oct 24, 2018):

不用管虚拟内存,这是go的内存管理机制,对你物理内存没有影响。建议了解相关知识。所有go程序都是如此。

<!-- gh-comment-id:432591538 --> @snail007 commented on GitHub (Oct 24, 2018): 不用管虚拟内存,这是go的内存管理机制,对你物理内存没有影响。建议了解相关知识。所有go程序都是如此。
Author
Owner

@moonfruit commented on GitHub (Oct 24, 2018):

了解了,这个真是比较奇怪的特性。。。

<!-- gh-comment-id:432614778 --> @moonfruit commented on GitHub (Oct 24, 2018): 了解了,这个真是比较奇怪的特性。。。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/goproxy#95
No description provided.