Snakemake中基准变量的含义

bli*_*bli 4 psutil snakemake

benchmark在snakemake工作流程中包括了一些规则的指令,并且生成的文件具有以下标头:

s   h:m:s   max_rss max_vms max_uss max_pss io_in   io_out  mean_load
Run Code Online (Sandbox Code Playgroud)

我找到的唯一文档提到了“基准txt文件(它将在MiB中包含运行时间和内存使用情况的制表符分隔的表)”。

我可以猜测,第1列和第2列是显示执行规则所花费时间的两种不同方式(以秒为单位,并转换为小时,分钟和秒)。

io_inio_out可能与磁盘的读取及写入活动,但在被他们测量什么单位?

还有什么?这是在某处记录的吗?

编辑:查看源代码

我在中找到了以下代码/snakemake/benchmark.py,这很可能是基准数据的来源:

s   h:m:s   max_rss max_vms max_uss max_pss io_in   io_out  mean_load
Run Code Online (Sandbox Code Playgroud)

因此,这似乎来自所提供的功能psutil

pap*_*kos 13

我将把它留在这里以供将来参考。

\n

通读

\n\n

如前所述:

\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n
科名类型(单位)描述
s浮点数(秒)运行时间(以秒为单位)
小时:分:秒细绳 (-)以小时、分钟、秒格式显示的运行时间
最大RSS浮动 (MB)最大“Resident Set Size\xe2\x80\x9d”,这是进程已使用的非交换物理内存。
最大虚拟机数浮动 (MB)Maximum \xe2\x80\x9cVirtual Memory Size\xe2\x80\x9d,这是进程使用的虚拟内存总量
最大uss浮动 (MB)\xe2\x80\x9cUnique Set Size\xe2\x80\x9d,这是进程唯一的内存,如果进程立即终止,它将被释放。
最大PSS浮动 (MB)\xe2\x80\x9cProportional Set Size\xe2\x80\x9d,是与其他进程共享的内存量,以在共享它的进程之间平均分配该量的方式进行计算(仅限 Linux)
io_in浮动 (MB)读取的 MB 数(累计)。
io_输出浮动 (MB)写入的 MB 数(累计)。
平均负载漂浮 (-)随着时间的推移,CPU 使用率除以总运行时间(第一行)
CPU时间漂浮(-)用户和系统的 CPU 时间总和
\n


hea*_*ien 5

肯定可以更好地记录snakemake中的基准测试,但是psutil 在这里是占优的:

get_memory_info()
Return a tuple representing RSS (Resident Set Size) and VMS (Virtual Memory Size) in bytes.
On UNIX RSS and VMS are the same values shown by ps. 
On Windows RSS and VMS refer to "Mem Usage" and "VM Size" columns of taskmgr.exe.

psutil.disk_io_counters(perdisk=False)

Return system disk I/O statistics as a namedtuple including the following attributes:
    read_count: number of reads
    write_count: number of writes
    read_bytes: number of bytes read
    write_bytes: number of bytes written
    read_time: time spent reading from disk (in milliseconds)
    write_time: time spent writing to disk (in milliseconds)
Run Code Online (Sandbox Code Playgroud)

您找到的代码确认所有内存使用情况和IO计数均以MB(=字节* 1024 * 1024)报告。