Skip to content

Conversation

@jebbench
Copy link
Contributor

@jebbench jebbench commented Jul 3, 2025

Adds some information on the memory use of libvips in long running applications and how to improve it.

@lopcode
Copy link
Owner

lopcode commented Jul 3, 2025

Thanks for the PR! Hoping to look through things over the next few days, but I'm also travelling, so could be next week.

The README does seem like a natural place to put usage tips. If we gather too many maybe it needs reorganised again, but fine to start with.

I'm unsure about changing allocators - my understanding is it can be dangerous but that could be wrong. I'd happily read some guidance if you can point me to some.

@jebbench
Copy link
Contributor Author

jebbench commented Jul 3, 2025

You could use the github wiki I guess if the README becomes too long.

The memory thing caught me out so I thought it was worth mentioning.

The libvips "developer checklist" suggests using jemalloc: https://www.libvips.org/API/8.17/developer-checklist.html#linux-memory-allocator

I couldn't find any official advice on using jemalloc with the JVM but there are numerous blog posts detailing it's use to solve memory issues (and a couple of JVM bugs that only appear when using it).

Thank's for the library and being so responsive!

@lopcode lopcode force-pushed the add-docs-for-memory-use branch 2 times, most recently from 8dda0a6 to d63e43b Compare July 8, 2025 16:02
@lopcode lopcode changed the title Adds some information on memory use to the README. Add operationalisation section to README, guidance on jemalloc Jul 8, 2025
@lopcode lopcode force-pushed the add-docs-for-memory-use branch 7 times, most recently from 154a41f to fc33dc3 Compare July 8, 2025 22:13
@lopcode lopcode force-pushed the add-docs-for-memory-use branch from fc33dc3 to 6b9d36a Compare July 8, 2025 22:15
@lopcode
Copy link
Owner

lopcode commented Jul 8, 2025

@jebbench I grew the scope of this PR a bit:

  • Adds a jemalloc Docker test variant
  • Runs the Docker tests in parallel on GitHub Actions
  • Adds a section to the README documenting "Operationalisation"
    • Includes your documentation about jemalloc and memory usage, with some of my own tweaks
    • Also includes a section on "untrusted operations"

If you're comfortable with the tweaks I made to your documentation, I'll merge it in 🙂

@jebbench
Copy link
Contributor Author

jebbench commented Jul 9, 2025

LGTM

@lopcode lopcode merged commit c070a00 into lopcode:main Jul 9, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants