Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #16972

Re: seq command terribly slow

From Richard Kettlewell <rjk@greenend.org.uk>
Newsgroups comp.os.linux.misc
Subject Re: seq command terribly slow
Date 2016-03-13 17:45 +0000
Organization terraraq NNTP server
Message-ID <87vb4q1dbo.fsf@mantic.terraraq.uk> (permalink)
References <slrnne9qgo.5pk.spamtrap42@one.localnet> <36kgrc-oj4.ln1@garv.home>

Show all headers | View raw


Gernot Fink <g.fink@gmx.net> writes:
> Robert Riches <spamtrap42@jacob21819.net> writes:
>> This command shows about 15MB/s:
>> 
>>     seq 1e12 | pv > /dev/null
>> Any ideas why seq is to slow?
>
> I think its because the stream is line bufferd. Each line is handled
> seperate.

Nope.

    $ seq --version
    seq (GNU coreutils) 8.5
    Copyright (C) 2010 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later
    <http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Written by Ulrich Drepper.
    $ strace -o junk/trace seq 1e12 | cat > /dev/null
    ^C
    $ tail junk/trace
    write(1, "\n887151\n887152\n887153\n887154\n887"..., 4096) = 4096
    write(1, "887736\n887737\n887738\n887739\n8877"..., 4096) = 4096
    write(1, "88321\n888322\n888323\n888324\n88832"..., 4096) = 4096
    write(1, "8906\n888907\n888908\n888909\n888910"..., 4096) = 4096
    write(1, "491\n889492\n889493\n889494\n889495\n"..., 4096) = 4096
    write(1, "76\n890077\n890078\n890079\n890080\n8"..., 4096) = 4096
    write(1, "1\n890662\n890663\n890664\n890665\n89"..., 4096) = 4096
    write(1, "\n891247\n891248\n891249\n891250\n891"..., 4096) = 4096
    --- SIGINT (Interrupt) @ 0 (0) ---
    +++ killed by SIGINT +++

-- 
http://www.greenend.org.uk/rjk/

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

seq command terribly slow Robert Riches <spamtrap42@jacob21819.net> - 2016-03-13 04:18 +0000
  Re: seq command terribly slow Richard Kettlewell <rjk@greenend.org.uk> - 2016-03-13 12:24 +0000
    Re: seq command terribly slow Robert Riches <spamtrap42@jacob21819.net> - 2016-03-13 16:42 +0000
      Re: seq command terribly slow "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> - 2016-03-14 14:22 +0100
        Re: seq command terribly slow Robert Riches <spamtrap42@jacob21819.net> - 2016-03-15 02:38 +0000
  Re: seq command terribly slow Gernot Fink <g.fink@gmx.net> - 2016-03-13 18:21 +0100
    Re: seq command terribly slow Richard Kettlewell <rjk@greenend.org.uk> - 2016-03-13 17:45 +0000
  Re: seq command terribly slow Eli the Bearded <*@eli.users.panix.com> - 2016-03-14 21:58 +0000
    Re: seq command terribly slow Robert Riches <spamtrap42@jacob21819.net> - 2016-03-15 02:44 +0000
      Re: seq command terribly slow Eli the Bearded <*@eli.users.panix.com> - 2016-03-16 00:41 +0000

csiph-web