EnglishFrenchSpanish

OnWorks favicon

buffer - Online in the Cloud

Run buffer in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command buffer that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


buffer - very fast reblocking program

SYNTAX


buffer [-S size] [-b blocks] [-s size] [-z size] [-m size] [-p percentage] [-u
microseconds] [-B] [-t] [-Z] [-i filename] [-o filename] [-d]

OPTIONS


-i filename
Use the given file as the input file. The default is stdin.

-o filename
Use the given file as the output file. The default is stdout.

-S size
After every chunk of this size has been written, print out how much has been written
so far. Also prints the total throughput. By default this is not set.

-s size
Size in bytes of each block. The default blocksize is 10k to match the normal output
of the tar(1) program.

-z size
Combines the -S and -s flags.

-b blocks
Number of blocks to allocate to shared memory circular buffer. Defaults to the
number required to fill up the shared memory requested.

-m size
Maximum size of the shared memory chunk to allocate for the circular queue. Defaults
to one megabyte.

-p percentage
Only start a write when the given percentage of the internal queue is full. A
percentage around 75 often proves best. Defaults to zero.

-u microseconds
After every write pause for this many microseconds. Defaults to zero. (Surprisingly
a small sleep, 100 usecs, after each write can greatly enhance throughput on some
drives.)

-B Force each block written to be padded out to the blocksize. This is needed by some
tape and cartridge drives. Defaults to unpadded. This only affects the last block
written.

-t On exiting print to stderr a brief message showing the total number of bytes written.

-Z If reading/writing directly to a character device (like a tape drive) then after each
gigabyte perform an lseek to the start of the file. Use this flag with extreme care.
It can only be used on devices where an lseek does not rewind the tape but does reset
the kernels position flags. It is used to allow more than 2 gigabytes to be written.

-d Print debug information to stderr during operation.

Sizes are a number with an optional trailing character. A 'b' multiplies the size by
512, a 'k' by 1024 and an 'm' by a meg.

DESCRIPTION


Buffer reads from standard input reblocking to the given blocksize and writes each block
to standard output.

Internally buffer is a pair of processes communicating via a large circular queue held in
shared memory. The reader process only has to block when the queue is full and the writer
process when the queue is empty. Buffer is designed to try and keep the writer side
continuously busy so that it can stream when writing to tape drives. When used to write
tapes with an intervening network buffer can result in a considerable increase in
throughput.

The default settings for buffer are normally good enough. If you are a heavy tape user
then it is worth your while trying out various different combinations of options. In
particular running a buffer at both ends of the pipe can provide a substantial increase
(see last example below).

EXAMPLES


$ buffer < /etc/termcap > /dev/rst8

$ tar cf - . | rsh somehost 'buffer > /dev/rst8'

$ dump fu - | rsh somehost 'buffer -s 16k > /dev/nrst8'
$ tar cf - . | buffer |
rsh somehost 'buffer -S 500K -p 75 > /dev/rst0'

BUFFER LIMITS


There are 2 limits in buffer affecting the maximum total buffer size: The maximum number
of blocks (2048) and the maximum size of a block (512kB). This results in a maximum total
buffer size of 1GB.

Note that there is also a kernel limit for the maximum size of a shared memory segment
(used by buffer internally) which is typically much lower than the limits in buffer. So
if buffer complains about not being able to create a shared memory segment, this limit
might have to be raised using the command sysctl kernel.shmmax=XXX (see also sysctl(1) and
proc(5)).

Use buffer online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Rocket.Chat Desktop Client
    Rocket.Chat Desktop Client
    Rocket.Chat Desktop client is the
    official desktop app for Rocket.Chat,
    the simple but powerful open source web
    chat platform. It's tested on macOS,
    Windows...
    Download Rocket.Chat Desktop Client
  • 2
    OfficeFloor
    OfficeFloor
    OfficeFloor provides inversion of
    coupling control, with its: - dependency
    injection - continuation injection -
    thread injection For more information
    visit the...
    Download OfficeFloor
  • 3
    DivKit
    DivKit
    DivKit is an open source Server-Driven
    UI (SDUI) framework. It allows you to
    roll out server-sourced updates to
    different app versions. Also, it can be
    used fo...
    Download DivKit
  • 4
    subconverter
    subconverter
    Utility to convert between various
    subscription format. Shadowrocket users
    should use ss, ssr or v2ray as target.
    You can add &remark= to
    Telegram-liked HT...
    Download subconverter
  • 5
    SWASH
    SWASH
    SWASH is a general-purpose numerical
    tool for simulating unsteady,
    non-hydrostatic, free-surface,
    rotational flow and transport phenomena
    in coastal waters as ...
    Download SWASH
  • 6
    VBA-M (Archived - Now on Github)
    VBA-M (Archived - Now on Github)
    Project has moved to
    https://github.com/visualboyadvance-m/visualboyadvance-m
    Features:Cheat creationsave statesmulti
    system, supports gba, gbc, gb, sgb,
    sgb2Tu...
    Download VBA-M (Archived - Now on Github)
  • More »

Linux commands

Ad