All of lore.kernel.org
 help / color / mirror / Atom feed
From: Troy Lee <troy_lee@aspeedtech.com>
To: Andrew Jeffery <andrew@aj.id.au>
Cc: "openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Re: Supporting new interfaces in phosphor-ipmi-flash
Date: Thu, 18 Feb 2021 06:24:06 +0000	[thread overview]
Message-ID: <20210218062406.GA31664@aspeedtech.com> (raw)
In-Reply-To: <838ffed7-37e3-4d73-a8f9-944439df9317@www.fastmail.com>

Hi Andrew,

The 02/15/2021 07:26, Andrew Jeffery wrote:
> 
> 
> On Tue, 9 Feb 2021, at 19:36, Troy Lee wrote:
> > Hi Team,
> > 
> > While I'm evaluating the performance for the design, I notice that the
> > maximum IPMI through/put over KCS / IPMB / LAN is about 120 command per
> > second. Does anyone know where the bottleneck is?
> 
> So a few thoughts:
> 
> There are a some hints on performance profiling in the wiki:
> 
> https://github.com/openbmc/openbmc/wiki/Performance-Profiling-in-OpenBMC
> 
> However, I'd start by inspecting the message timings on D-Bus. You can capture
> the D-Bus traffic on the BMC with:
> 
> ```shell
> # busctl capture > /tmp/dbus.pcap
> ```
> 
> After that, run your image transfer test. Once the transfer completes, stop the
> capture and copy the pcap file off the BMC.
> 
> One approach to analysing the capture is to use Wireshark[1]. However, I've
> found that for this kind of exploratory stuff, scripting the filtering and
> output can give useful results. On that front I've written dbus-pcap:
> 
> https://github.com/openbmc/openbmc-tools/tree/master/dbus-pcap
The tool is very useful, I used to use dbus-monitor and inspect message
traffic by eyes only.

> 
> which can spit out the messages in JSON format if necessary and it takes
> standard D-Bus match rules for filtering as optional positional arguments:
> 
> https://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-routing-match-rules
> 
> If the overhead is not dominated by the IPC on its own, it's probably time to
> start inspecting specific processes with `perf`. The wiki talks a little more
> about that.
> 
> Hope that helps.
> 
> Andrew
> 
> [1] https://www.wireshark.org/

It roughly takes 8ms to process a blobWrite command. I'll see if any thing 
I can help to improve or it is a limitation.

```
# OBMC OEM BlobTransfer blobWrite
1613620034.097539:
CookedMessage(header=CookedHeader(fixed=FixedHeader(endian=108, type=1, flags=0, version=1, length=32, cookie=107), fields=[Field(type=<MessageFieldType.PATH: 1>, data='/xyz/openbmc_project/Ipmi'), Field(type=<MessageFieldType.MEMBER: 3>, data='execute'), Field(type=<MessageFieldType.INTERFACE: 2>, data='xyz.openbmc_project.Ipmi.Server'), Field(type=<MessageFieldType.DESTINATION: 6>, data='xyz.openbmc_project.Ipmi.Host'), Field(type=<MessageFieldType.SIGNATURE: 8>, data='yyyaya{sv}'), Field(type=<MessageFieldType.SENDER: 7>, data=':1.75')]), body=[46, 0, 128, [207, 194, 0, 4, 211, 39, 84, 226, 0, 0, 64, 0, 0, 0, 16, 0], []])

# Cascaded Checking User Priviledge, not sure where it introduced, but
# it shows on every command even with in-band channel
1613620034.097977:
CookedMessage(header=CookedHeader(fixed=FixedHeader(endian=108, type=1, flags=0, version=1, length=10, cookie=224), fields=[Field(type=<MessageFieldType.PATH: 1>, data='/org/freedesktop/DBus'), Field(type=<MessageFieldType.MEMBER: 3>, data='GetConnectionUnixUser'), Field(type=<MessageFieldType.INTERFACE: 2>, data='org.freedesktop.DBus'), Field(type=<MessageFieldType.DESTINATION: 6>, data='org.freedesktop.DBus'), Field(type=<MessageFieldType.SIGNATURE: 8>, data='s'), Field(type=<MessageFieldType.SENDER: 7>, data=':1.72')]), body=[':1.75'])

# Method returns for checking user priviledge
1613620034.098058:
CookedMessage(header=CookedHeader(fixed=FixedHeader(endian=108, type=2, flags=1, version=1, length=4, cookie=4294967295), fields=[Field(type=<MessageFieldType.REPLY_SERIAL: 5>, data=224), Field(type=<MessageFieldType.SENDER: 7>, data='org.freedesktop.DBus'), Field(type=<MessageFieldType.DESTINATION: 6>, data=':1.72'), Field(type=<MessageFieldType.SIGNATURE: 8>, data='u')]), body=[0])

# Method returns for OBMC OEM BlobTransfer blobWrite
1613620034.106147:
CookedMessage(header=CookedHeader(fixed=FixedHeader(endian=108, type=2, flags=1, version=1, length=11, cookie=225), fields=[Field(type=<MessageFieldType.REPLY_SERIAL: 5>, data=107), Field(type=<MessageFieldType.DESTINATION: 6>, data=':1.75'), Field(type=<MessageFieldType.SIGNATURE: 8>, data='(yyyyay)'), Field(type=<MessageFieldType.SENDER: 7>, data=':1.72')]), body=[[47, 0, 128, 0, [207, 194, 0]]])
```

Thanks,
Troy Lee


      reply	other threads:[~2021-02-18  6:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  9:43 Supporting new interfaces in phosphor-ipmi-flash Troy Lee
2021-01-27 16:04 ` Patrick Venture
2021-01-27 17:48   ` Benjamin Fair
2021-01-28  7:15     ` Troy Lee
2021-01-27 23:14 ` Andrew Jeffery
2021-01-28  7:29   ` Troy Lee
2021-01-31 23:19     ` Andrew Jeffery
2021-02-01  7:37       ` Troy Lee
2021-02-09  9:06         ` Troy Lee
2021-02-14 23:26           ` Andrew Jeffery
2021-02-18  6:24             ` Troy Lee [this message]

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=20210218062406.GA31664@aspeedtech.com \
    --to=troy_lee@aspeedtech.com \
    --cc=andrew@aj.id.au \
    --cc=openbmc@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.