esp32 P4 performance

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: esp32 P4 performance

Postby chegewara » Wed Sep 04, 2024 10:40 am

LCD tests with ek79007:
- draw 60x60px squares, random position, random color, clear screen every 1s
- square pixel are filled every frame, which is array of 3600 pixels
-- with PSRAM 200MHz, standard setup

Code: Select all

I (2584) : refresh rate(fps): 70, draw bitmap rate: 3817
I (3586) : refresh rate(fps): 70, draw bitmap rate: 3790
I (4586) : refresh rate(fps): 70, draw bitmap rate: 3789
I (5586) : refresh rate(fps): 69, draw bitmap rate: 3788
I (6587) : refresh rate(fps): 70, draw bitmap rate: 3787
I (7587) : refresh rate(fps): 70, draw bitmap rate: 3788
I (8587) : refresh rate(fps): 69, draw bitmap rate: 3789
-- with PSRAM 200MHz, overclocked LCD DPI clock up to 75MHz

Code: Select all

I (2585) : refresh rate(fps): 94, draw bitmap rate: 3817
I (3587) : refresh rate(fps): 93, draw bitmap rate: 3787
I (4587) : refresh rate(fps): 93, draw bitmap rate: 3787
I (5588) : refresh rate(fps): 93, draw bitmap rate: 3787
I (6588) : refresh rate(fps): 93, draw bitmap rate: 3784
I (7588) : refresh rate(fps): 92, draw bitmap rate: 3785
I (8588) : refresh rate(fps): 93, draw bitmap rate: 3785
- draw 160x160px squares, random position, single color, clear screen every 1s
-- square pixels filled beforehand, no need to do it per frame (its like using bitmaps)
-- with PSRAM 200MHz, overclocked LCD DPI clock up to 75MHz

Code: Select all

I (2585) : refresh rate(fps): 94, draw bitmap rate: 2398
I (3587) : refresh rate(fps): 93, draw bitmap rate: 2393
I (4587) : refresh rate(fps): 93, draw bitmap rate: 2375
I (5588) : refresh rate(fps): 93, draw bitmap rate: 2375
I (6589) : refresh rate(fps): 93, draw bitmap rate: 2364
I (7589) : refresh rate(fps): 93, draw bitmap rate: 2361
I (8590) : refresh rate(fps): 93, draw bitmap rate: 2397

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: esp32 P4 performance

Postby chegewara » Wed Oct 02, 2024 3:54 am

And here is another performance test. This time it is TCP/IP over USB (CDC-NCM), which in fact is measuring USB HS on P4:

Code: Select all

Client connecting to 192.168.4.1, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  1] local 192.168.4.2 port 33464 connected with 192.168.4.1 port 5001 (icwnd/mss/irtt=14/1440/2383)
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-3.0000 sec  12.2 MBytes  34.2 Mbits/sec
[  1] 3.0000-6.0000 sec  12.1 MBytes  33.9 Mbits/sec
[  1] 6.0000-9.0000 sec  12.2 MBytes  34.2 Mbits/sec
[  1] 9.0000-12.0000 sec  12.1 MBytes  33.9 Mbits/sec
[  1] 12.0000-15.0000 sec  12.2 MBytes  34.2 Mbits/sec
[  1] 15.0000-18.0000 sec  12.1 MBytes  33.9 Mbits/sec
[  1] 18.0000-21.0000 sec  12.2 MBytes  34.2 Mbits/sec
[  1] 21.0000-24.0000 sec  12.2 MBytes  34.2 Mbits/sec
[  1] 24.0000-27.0000 sec  12.1 MBytes  33.9 Mbits/sec
[  1] 27.0000-29.9971 sec  12.3 MBytes  34.5 Mbits/sec
[  1] 0.0000-29.9971 sec   122 MBytes  34.1 Mbits/sec

Code: Select all

iperf> I (2286) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.4.2
iperf> iperf -s -i 3
I (55936) IPERF: mode=tcp-server sip=localhost:5001, dip=0.0.0.0:5001, interval=3, time=30
I (55936) iperf: Socket created
iperf> I (62376) iperf: accept: 192.168.4.2,33464

Interval       Bandwidth
 0.0- 3.0 sec  32.51 Mbits/sec
 3.0- 6.0 sec  32.48 Mbits/sec
 6.0- 9.0 sec  32.46 Mbits/sec
 9.0-12.0 sec  32.48 Mbits/sec
12.0-15.0 sec  32.52 Mbits/sec
15.0-18.0 sec  32.48 Mbits/sec
18.0-21.0 sec  32.49 Mbits/sec
21.0-24.0 sec  32.53 Mbits/sec
24.0-27.0 sec  32.41 Mbits/sec
27.0-30.0 sec  32.44 Mbits/sec
 0.0-30.0 sec  32.48 Mbits/sec
I (92376) iperf: TCP Socket server is closed.
I (92376) iperf: iperf exit
Does it look bad?
Sure, USB-HS is 480Mb/s, but reaching 34Mb/s on esp32-p4 and not optimized code should be at least satisfying, or maybe not?

Without context its hard to answer this question, because we dont know what may be the reason of this "poor" result.
It may be tinyusb, hardware or maybe test app running on it. Personally I think that at the moment this speed should be enough for most USB application built on P4.

PS just to clarify:
this is TCP/IP test, but it is not using wifi or ethernet, its only pure USB test

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: esp32 P4 performance

Postby chegewara » Fri Oct 04, 2024 3:17 pm

Yet another and probably not the last performance test.
Just for this test i decided to buy nvme m2 disk, not super speed, but its enough to increase MSC read/write operations.
Here we can see P4 stats

Code: Select all

perf start, buffer size: 2048, setvbuf: 2048
Read speed 7.70 MiB/s
perf start, buffer size: 3072, setvbuf: 3072
Read speed 10.06 MiB/s
perf start, buffer size: 4096, setvbuf: 4096
Read speed 12.81 MiB/s
perf start, buffer size: 5120, setvbuf: 5120
Read speed 13.60 MiB/s
perf start, buffer size: 6144, setvbuf: 6144
Read speed 15.21 MiB/s
perf start, buffer size: 7168, setvbuf: 7168
Read speed 16.04 MiB/s
perf start, buffer size: 8192, setvbuf: 8192
Read speed 18.70 MiB/s
perf start, buffer size: 16384, setvbuf: 16384
Read speed 24.39 MiB/s
perf start, buffer size: 65536, setvbuf: 65536
Read speed 29.28 MiB/s

perf start, buffer size: 8192
Write speed 20.30 MiB/s, 
perf start, buffer size: 65536
Write speed 32.24 MiB/s,
Worth to mention my highend laptop with usb hub in middle to degrade usb to hs (480 mbit/s) can read this disk with 45MB/s and write it with 40MB/s.

So esp32-P4 does not look so bad.

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: esp32 P4 performance

Postby chegewara » Thu Nov 07, 2024 12:37 pm

For all who are not bored reading my posts and still are interested to see more tests with P4 here is interesting component from espressif which is supporting all kind of network bridging. I prepared this PR to support P4:
https://github.com/espressif/esp-iot-bridge/pull/92

This is wired_nic example which is bridging USB and internal EMAC.
Attachments
Screenshot from 2024-11-07 13-33-54.png
Screenshot from 2024-11-07 13-33-54.png (15.57 KiB) Viewed 848 times

Who is online

Users browsing this forum: Bing [Bot] and 38 guests