gpt4 book ai didi

linux - 为什么 TOP 命令的详细列表中列出的 SWAP 大于摘要中的?

转载 作者:太空狗 更新时间:2023-10-29 11:06:02 26 4
gpt4 key购买 nike

TOP 命令结果:

Mem:   3991840k total,  1496328k used,  2495512k free,   156752k buffers  **Swap**:  3905528k total,     **3980k** used,  3901548k free,   447860k cached    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  **SWAP** COMMAND  28250 www-data  20   0  430m 210m  21m R   63  5.4   0:07.29 **219m** apache2  28266 www-data  20   0  256m  40m  21m S   30  1.0   0:01.94 **216m** apache2  28206 www-data  20   0  260m  44m  21m S   27  1.1   0:10.27 **215m** apache2  28259 www-data  20   0  256m  40m  21m S   26  1.0   0:02.21 **216m** apache2  

详细信息列表显示一组 apache2 进程正在使用大约 210m+ 的 SWAP 内存,但摘要报告仅使用了 3980k。详细列表中的总 SWAP 内存比摘要中的大得多。这两个 swap 指的是同一个东西吗?

最佳答案

引自http://www.linuxforums.org/articles/using-top-more-efficiently_89.html :

VIRT=RES+SWAP

As explained previously, VIRT includes anything inside task'saddress space, no matter it is in RAM,swapped out or still not loaded fromdisk. While RES represents total RAMconsumed by this task. So, SWAP heremeans it represents the total amountof data being swapped out OR still notloaded from disk. Don't be fooled bythe name, it doesn't just representthe swapped out data.

关于linux - 为什么 TOP 命令的详细列表中列出的 SWAP 大于摘要中的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5196491/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com