Skip to content

Commit

Permalink
Typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
smimram committed Oct 27, 2024
1 parent 3df0dc2 commit f7c269e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _posts/2024-10-26-a-faster-liquidsoap-part-deux.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ has an excellent example of such issues.
Last for this list (for now!), liquidsoap is also using the OCaml compiler. One of the feature of the compiler is that it can
handle some low-level memory allocation and freeing automatically.

Under the hood, the OCaml compiler ads a runtime library to the compiled program that is able to track when some data is allocated by the program
Under the hood, the OCaml compiler adds a runtime library to the compiled program that is able to track when some data is allocated by the program
and when it is no longer used. Once it detects that the data is no longer used, it can free it without requiring the programmer to do it.

While this is really convenient and can help making sure that OCaml program are memory safe, this also includes another layer that is not entirely
Expand Down Expand Up @@ -257,15 +257,15 @@ Let's see now how we can optimize memory usage in liquidsoap!

As we mentioned, shared libraries increase the process' memory usage. Most of this increase is from shared memory but some of it will also be memory allocated by the shared libraries, even if you do not user their feature.

Thus, a first thing to optimize memory usage is to only compile the feature that you use. This also reduces the risk of fatal errors!
Thus, a first thing to optimize memory usage is to only compile the features that you use. This also reduces the risk of fatal errors!

Here's a breakdown of memory usage in liquidsoap with only one optional feature enabled:

![memory per feature](https://github.com/user-attachments/assets/2452a0a2-7f0a-484f-8805-6429d6202535)

Please note that this graph was done on a development branch of liquidsoap and is not necessarily reflective of the memory usage of the final `2.3.0` release!

As we can see, memory usage is roughly the same except for `ffmpeg`. This was expected because `ffmpegs` adds a lot of shared libraries.
As we can see, memory usage is roughly the same except for `ffmpeg`. This was expected because `ffmpeg` adds a lot of shared libraries.

Clearly, if you are not using any of `ffmpeg`'s optional features and memory usage is a concern, make sure to disable this optional feature. And, for good measure, any other optional feature that you do not use.

Expand Down

0 comments on commit f7c269e

Please sign in to comment.