netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stefano Brivio <sbrivio@redhat.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, Sabrina Dubroca <sd@queasysnail.net>
Subject: Re: [PATCH iproute2 net-next v2 3/4] ss: Buffer raw fields first, then render them as a table
Date: Tue, 12 Feb 2019 16:42:04 -0800	[thread overview]
Message-ID: <82f1bc98-df6d-2b0a-17e5-fa057563284e@gmail.com> (raw)
In-Reply-To: <fef5eed38c3f47f334136fa2d857b6478d497d03.1513039237.git.sbrivio@redhat.com>



On 12/11/2017 04:46 PM, Stefano Brivio wrote:
> This allows us to measure the maximum field length for each
> column before printing fields and will permit us to apply
> optimal field spacing and distribution. Structure of the output
> buffer with chunked allocation is described in comments.
> 
> Output is still unchanged, original spacing is used.
> 
> Running over one million sockets with -tul options by simply
> modifying main() to loop 50,000 times over the *_show()
> functions, buffering the whole output and rendering it at the
> end, with 10 UDP sockets, 10 TCP sockets, while throwing
> output away, doesn't show significant changes in execution time
> on my laptop with an Intel i7-6600U CPU:
> 
> - before this patch:
> $ time ./ss -tul > /dev/null
> real	0m29.899s
> user	0m2.017s
> sys	0m27.801s
> 
> - after this patch:
> $ time ./ss -tul > /dev/null
> real	0m29.827s
> user	0m1.942s
> sys	0m27.812s
> 

I do not get it.

"ss -emoi " uses almost 1KB per socket.

10,000,000 sockets -> we need about 10GB of memory  ???

This is a serious regression.



  reply	other threads:[~2019-02-13  0:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12  0:46 [PATCH iproute2 net-next v2 0/4] Abstract columns, properly space and wrap fields Stefano Brivio
2017-12-12  0:46 ` [PATCH iproute2 net-next v2 1/4] ss: Replace printf() calls for "main" output by calls to helper Stefano Brivio
2017-12-12  0:46 ` [PATCH iproute2 net-next v2 2/4] ss: Introduce columns lightweight abstraction Stefano Brivio
2017-12-12  0:46 ` [PATCH iproute2 net-next v2 3/4] ss: Buffer raw fields first, then render them as a table Stefano Brivio
2019-02-13  0:42   ` Eric Dumazet [this message]
2019-02-13  8:37     ` Stefano Brivio
2019-02-13 16:51       ` Stephen Hemminger
2019-02-13 17:22         ` Stefano Brivio
2019-02-13 17:32           ` Eric Dumazet
2019-02-13 17:31       ` Eric Dumazet
2019-02-13 17:38         ` Stefano Brivio
2019-02-13 18:01           ` Eric Dumazet
2019-02-13 21:17         ` Stefano Brivio
2019-02-13 21:55           ` Stephen Hemminger
2019-02-13 22:20             ` Stefano Brivio
2019-02-13 23:39             ` Phil Sutter
2019-02-13 23:47               ` David Ahern
2017-12-12  0:46 ` [PATCH iproute2 net-next v2 4/4] ss: Implement automatic column width calculation Stefano Brivio
2017-12-12 20:13 ` [PATCH iproute2 net-next v2 0/4] Abstract columns, properly space and wrap fields Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82f1bc98-df6d-2b0a-17e5-fa057563284e@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sbrivio@redhat.com \
    --cc=sd@queasysnail.net \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).