zoukankan      html  css  js  c++  java
  • hackbench

     

    https://man.cx/hackbench

    NAME

    hackbench - scheduler benchmark/stress test

    SYNOPSIS

    hackbench [-p|--pipe] [-s|--datasize <bytes>] [-l|--loops <num-loops>] [-g|--groups <num-groups>] [-f|--fds <num-fds>] [-T|--threads] [-P|--process] [--help]

    DESCRIPTION

    Hackbench is both a benchmark and a stress test for the Linux kernel scheduler. It’s main job is to create a specified number of pairs of schedulable entities (either threads or traditional processes) which communicate via either sockets or pipes and time how long it takes for each pair to send data back and forth.

    OPTIONS

    These programs follow the usual GNU command line syntax, with long options starting with two dashes ("--").
    A summary of options is included below.
    -p, --pipe

    Sends the data via a pipe instead of the socket (default)

    -s, --datasize=<size in bytes>

    Sets the amount of data to send in each message

    -l, --loops=<number of loops>

    How many messages each sender/receiver pair should send

    -g, --groups=<number of groups>

    Defines how many groups of senders and receivers should be started

    -f, --fds=<number of file descriptors>

    Defines how many file descriptors each child should use. Note that the effective number will be twice the amount you set here, as the sender and receiver children will each open the given amount of file descriptors.

    -T, --threads

    Each sender/receiver child will be a POSIX thread of the parent.

    -P, --process

    Hackbench will use fork() on all children (default behaviour)

     

    --help

     

    Shows a simple help screen

     

    EXAMPLES

    Running hackbench without any options will give default behaviour, using fork() and sending data between senders and receivers via sockets.

    user@host: ~ $ hackbench
    Running in process mode with 10 groups using 40 file descriptors each (== 400 tasks)
    Each sender will pass 100 messages of 100 bytes
    Time: 0.890

    To use pipes between senders and receivers and using threads instead of fork(), run

    user@host: ~ $ hackbench --pipe --threads (or hackbench -p -T)
    Running in threaded mode with 10 groups using 40 file descriptors each (== 400 tasks)
    Each sender will pass 100 messages of 100 bytes
    Time: 0.497

    Set the datasize to 512 bytes, do 200 messages per sender/receiver pairs and use 15 groups using 25 file descriptors per child, in process mode.

    user@host: ~ $ hackbench -s 512 -l 200 -g 15 -f 25 -P
    Running in process mode with 15 groups using 50 file descriptors each (== 750 tasks)
    Each sender will pass 200 messages of 512 bytes
    Time: 4.497

    AUTHORS

    hackbench was written by Rusty Russell <rusty [AT] rustcorp.au> with contributions from Yanmin Zhang <yanmin_zhang [AT] linux.com>, Ingo Molnar <mingo [AT] elte.hu> and David Sommerseth <davids [AT] redhat.com>

    This manual page was written by Clark Williams <williams [AT] redhat.com> and David Sommerseth <davids [AT] redhat.com>

    HISTORY

    This version of hackbench is based on the code downloaded from http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c. Yanmin Zhang merged the original hackbench code from
    http://devresources.linuxfoundation.org/craiger/hackbench/src/hackbench.c which uses fork() and a modified version from
    http://www.bullopensource.org/posix/pi-futex/hackbench_pth.c which uses pthread only and gave the possibility to change behaviour at run time. Hackbench have since then gone through some more rewriting to improve error handling and proper tracking of fork()ed children, to avoid leaving zombies on the system if hackbench stops unexpectedly.

  • 相关阅读:
    Oracle EXTRACT()函数与to_char() 函数
    Java内部类
    SQL 之 Group By
    Android LayoutInflater布局填充器
    JS 图片转Base64
    C# 事件与委托的区别
    AngularJS的循环输出
    jquery实现button倒计时
    重新理解B/S和C/S的区别
    HashMap与HashTable
  • 原文地址:https://www.cnblogs.com/sophiascpn/p/13798328.html
Copyright © 2011-2022 走看看