Skip to content

Reduce RAM consumption for civetweb HTTP sample #21179

@erwango

Description

@erwango

Is your enhancement proposal related to a problem? Please describe.
Current configuration for Civetweb HTTP sample requires too much RAM (>230K), which prevents it from being run on wide number of targets.

This choice was deliberate at PR introduction (#17019) as described in this comment.

Civetweb is the only HTTP client sample available today for zephyr. This memory consumption makes is unavailable for many targets, so situation is like there were no Zephyr HTTP client for many Zephyr users.

Before net refactoring, I was able to run a micropython powered HTTP server on top of existing networking stack on nucleo_f429zi (192K RAM), so I would expect we could have a zephyr native alternative running on the same platform today.

samples/net/sockets/civetweb configuration shows that main factor for RAM consumption is the following setting:

CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=131072

Below 92000 an illegal exception appears. At 92000 connection closes after a few history clicks.
So getting it down to an acceptable level obviously requires some fine tuning and potentially further optimisation.

Describe the solution you'd like
Rework civetweb sample configuration to fit below an acceptable RAM consumption.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions