# Benchmark (https://docs.cochl.ai/docs/core/benchmark)



## Benchmark methods [#benchmark-methods]

### (1) CPU usage [#1-cpu-usage]

CPU usage is measured per process, for the PID of the `sense-stream` app after it launches. The result can exceed 100% for multi-threaded applications utilizing multiple cores simultaneously. CPU usage is sampled once per second within each minute, and the final value is the arithmetic mean of these samples.

* **Measurement: `(process_cpu_time_delta / system_cpu_time_delta) × 100`**
* **Unit: %**

### (2) Memory usage [#2-memory-usage]

Memory usage is calculated by summing the PSS (Proportional Set Size) and swap memory of the PID after launching the `sense-stream` app. PSS provides fair allocation of shared memory usage across processes. Memory usage is sampled once per second within each minute, and the final value is the arithmetic mean of these samples.

* **Measurement: `PSS + SwapPss` from `/proc/pid/smaps`**
* **Unit: KB**

### (3) Inference time [#3-inference-time]

Inference time refers to the time it takes to process a single window after launching the `sense-stream` app. The measurement is log-based, parsing the per-window prediction time from application JSON logs. These measurements were taken with v1.6.0, whose results name this field `prediction_time` (v1.6.1 renamed it `prediction_time_ms`). The number of measurements depends on the application’s `push_period` configuration. Inference time is measured over each minute, and the final value is the arithmetic mean of all measurements in that minute.

* **Measurement: Parsed from the JSON `prediction_time` field in application stdout (v1.6.0)**
* **Unit: ms**

### (4) Inference benchmark across devices [#4-inference-benchmark-across-devices]

All benchmarks were conducted using the methods described above. The following table provides a consolidated overview of hardware specifications and benchmark results for Cochl.Sense Core on each supported platform. Metrics include CPU configuration, memory, and average inference time based on Cochl.Sense Core v1.6.0.

| Device             | CPU                                                | Memory | CPU usage (%) | Memory usage (KB) | Inference time (ms) |
| ------------------ | -------------------------------------------------- | ------ | ------------- | ----------------- | ------------------- |
| Raspberry Pi 3     | ARM Cortex-A53 (4 cores, 1.2GHz)                   | 1 GB   | 7.79          | 54,797            | 173.24              |
| Raspberry Pi 4     | ARM Cortex-A72 (4 cores, 1.8GHz)                   | 4 GB   | 6.75          | 53,612            | 156.48              |
| NVIDIA Orin Nano   | ARM v8 (6 cores, 1.5GHz)                           | 8 GB   | 1.52          | 57,354            | 46.05               |
| NVIDIA Jetson Nano | ARM v8 (4 cores, 1.5GHz)                           | 4 GB   | 4.45          | 54,593            | 94.34               |
| Ubuntu 22 Desktop  | Intel Core i7-8700K (6 cores / 12 threads, 3.7GHz) | 64 GB  | 0.00          | 55,118            | 13.26               |
| Ubuntu 18 Desktop  | Intel Core i7-8700 (6 cores / 12 threads, 3.2GHz)  | 32 GB  | 0.42          | 54,648            | 10.40               |

## Raspberry Pi 3 Model B Rev 1.2 [#raspberry-pi-3-model-b-rev-12]

* **CPU info**: 4 Core 1.2GHz Cortex-A53, **CoreMark score**: 5597.39
* **RAM size**: 1 GB
* **OS version**: Debian GNU/Linux 11 (bullseye)
* **Kernel version**: 6.1.21-v8+
* **System architecture**: aarch64
* **Storage (Device model)**: SC32G
* **Ethernet interface info**:
  * **Interface**: eth0
  * **Speed**: 100Mb/s
  * **Driver**: smsc95xx

### CPU usage [#cpu-usage]

<img src="/images/core/benchmark/v1.6.0_rpi3_cpu_usage.png" alt="Raspberry Pi 3 Model B: CPU usage over time, Cochl.Sense Core v1.6.0" />

### Memory usage [#memory-usage]

<img src="/images/core/benchmark/v1.6.0_rpi3_mem_usage.png" alt="Raspberry Pi 3 Model B: memory usage over time, Cochl.Sense Core v1.6.0" />

### Average inference time [#average-inference-time]

<img src="/images/core/benchmark/v1.6.0_rpi3_inf_time.png" alt="Raspberry Pi 3 Model B: inference time over time, Cochl.Sense Core v1.6.0" />

## Raspberry Pi 4 Model B Rev 1.4 [#raspberry-pi-4-model-b-rev-14]

* **CPU info**: 4 Core 1.8GHz Cortex-A72, **CoreMark score**: 15371.61
* **RAM size**: 4 GB
* **OS version**: Debian GNU/Linux 11 (bullseye)
* **Kernel version**: 6.1.21-v8+
* **System architecture**: aarch64
* **Storage (Device model)**: SC32G
* **Ethernet interface info**:
  * **Interface**: eth0
  * **Speed**: 1000Mb/s
  * **Driver**: bcmgenet

### CPU usage [#cpu-usage-1]

<img src="/images/core/benchmark/v1.6.0_rpi4_cpu_usage.png" alt="Raspberry Pi 4 Model B: CPU usage over time, Cochl.Sense Core v1.6.0" />

### Memory usage [#memory-usage-1]

<img src="/images/core/benchmark/v1.6.0_rpi4_mem_usage.png" alt="Raspberry Pi 4 Model B: memory usage over time, Cochl.Sense Core v1.6.0" />

### Average inference time [#average-inference-time-1]

<img src="/images/core/benchmark/v1.6.0_rpi4_inf_time.png" alt="Raspberry Pi 4 Model B: inference time over time, Cochl.Sense Core v1.6.0" />

## NVIDIA Orin Nano Developer Kit [#nvidia-orin-nano-developer-kit]

* **CPU info**: 6 Core 1.5GHz ARMv8 Processor rev 1 (v8l), **CoreMark score**: 23618.33
* **RAM size**: 8 GB
* **OS version**: Ubuntu 20.04.5 LTS
* **Kernel version**: 5.10.104-tegra
* **System architecture**: aarch64
* **Storage (Device model)**: FORESEE XP1000F256G
* **Ethernet interface info**:
  * **Interface**: eth0
  * **Speed**: 1000Mb/s
  * **Driver**: r8169

### CPU usage [#cpu-usage-2]

<img src="/images/core/benchmark/v1.6.0_orin_cpu_usage.png" alt="NVIDIA Orin Nano Developer Kit: CPU usage over time, Cochl.Sense Core v1.6.0" />

### Memory usage [#memory-usage-2]

<img src="/images/core/benchmark/v1.6.0_orin_mem_usage.png" alt="NVIDIA Orin Nano Developer Kit: memory usage over time, Cochl.Sense Core v1.6.0" />

### Average inference time [#average-inference-time-2]

<img src="/images/core/benchmark/v1.6.0_orin_inf_time.png" alt="NVIDIA Orin Nano Developer Kit: inference time over time, Cochl.Sense Core v1.6.0" />

## NVIDIA Jetson Nano Developer Kit [#nvidia-jetson-nano-developer-kit]

* **CPU info**: 4 Core 1.5GHz ARMv8 Processor rev 1 (v8l), **CoreMark score**: 10287.01
* **RAM size**: 4 GB
* **OS version**: Ubuntu 18.04.6 LTS
* **Kernel version**: 4.9.201-tegra
* **System architecture**: aarch64
* **Storage (Device model)**: SS32G
* **Ethernet interface info**:
  * **Interface**: eth0
  * **Speed**: 1000Mb/s
  * **Driver**: r8168

### CPU usage [#cpu-usage-3]

<img src="/images/core/benchmark/v1.6.0_jetson-nano_cpu_usage.png" alt="NVIDIA Jetson Nano Developer Kit: CPU usage over time, Cochl.Sense Core v1.6.0" />

### Memory usage [#memory-usage-3]

<img src="/images/core/benchmark/v1.6.0_jetson-nano_mem_usage.png" alt="NVIDIA Jetson Nano Developer Kit: memory usage over time, Cochl.Sense Core v1.6.0" />

### Average inference time [#average-inference-time-3]

<img src="/images/core/benchmark/v1.6.0_jetson-nano_inf_time.png" alt="NVIDIA Jetson Nano Developer Kit: inference time over time, Cochl.Sense Core v1.6.0" />

## Ubuntu 22.04 desktop (x86\_64) [#linux-680-47-generic-x86_64-with-glibc235]

* **CPU info**: 6 Core (12 threads) 4.7GHz Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz, **CoreMark score**: 52548.61
* **RAM size**: 64 GB
* **OS version**: Ubuntu 22.04.5 LTS
* **Kernel version**: 6.8.0-47-generic
* **System architecture**: x86\_64
* **Storage (Device model)**: Samsung SSD 980 PRO 1TB
* **Ethernet interface info**:
  * **Interface**: enp0s31f6
  * **Speed**: 1000Mb/s
  * **Driver**: e1000e

### CPU usage [#cpu-usage-4]

<img src="/images/core/benchmark/v1.6.0_ubu22_cpu_usage.png" alt="x86_64 PC, Ubuntu 22.04: CPU usage over time, Cochl.Sense Core v1.6.0" />

### Memory usage [#memory-usage-4]

<img src="/images/core/benchmark/v1.6.0_ubu22_mem_usage.png" alt="x86_64 PC, Ubuntu 22.04: memory usage over time, Cochl.Sense Core v1.6.0" />

### Average inference time [#average-inference-time-4]

<img src="/images/core/benchmark/v1.6.0_ubu22_inf_time.png" alt="x86_64 PC, Ubuntu 22.04: inference time over time, Cochl.Sense Core v1.6.0" />

## Ubuntu 18.04 desktop (x86\_64) [#linux-540-150-generic-x86_64-with-glibc227]

* **CPU info**: 6 Core (12 threads) 4.6GHz Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz, **CoreMark score**: 35207.14
* **RAM size**: 32 GB
* **OS version**: Ubuntu 18.04.6 LTS
* **Kernel version**: 5.4.0-150-generic
* **System architecture**: x86\_64
* **Storage (Device model)**: Samsung SSD 860
* **Ethernet interface info**:
  * **Interface**: enp2s0
  * **Speed**: 1000Mb/s
  * **Driver**: r8169

### CPU usage [#cpu-usage-5]

<img src="/images/core/benchmark/v1.6.0_ubu18_cpu_usage.png" alt="x86_64 PC, Ubuntu 18.04: CPU usage over time, Cochl.Sense Core v1.6.0" />

### Memory usage [#memory-usage-5]

<img src="/images/core/benchmark/v1.6.0_ubu18_mem_usage.png" alt="x86_64 PC, Ubuntu 18.04: memory usage over time, Cochl.Sense Core v1.6.0" />

### Average inference time [#average-inference-time-5]

<img src="/images/core/benchmark/v1.6.0_ubu18_inf_time.png" alt="x86_64 PC, Ubuntu 18.04: inference time over time, Cochl.Sense Core v1.6.0" />
