Existing mfe frontends warn about write cache size being too small

Issue #344 new
Ben Smith created an issue

7c3b89d introduces a minimum “write cache size” of 10MB. All existing mfe frontends had the default size set to 100kB, and I expect almost nobody ever thought about or changed this value. So every one of those frontends now warns requested write cache size 100000 on buffer "BUFL2" too small, will use minimum size 10000000, every time they are started.

This is very annoying, and will require manually editing Common in the ODB for every equipment in every experiment.

Options (in order of personal preference):

  1. Set the default size to 10MB, but still allow 100kB as a valid option (user has to make no changes)
  2. Automatically fix the write cache size in Common if it’s less than the minimum allowed value (warn once, fix it, never need to warn again)
  3. Provide a simple script to fix all the Common values, which we can add to the next set of release notes / changelog (we will still get elog questions, but at least we can point to a script to fix things)
  4. Leave it as is (experts have lots of equipments to update; shifters will get confused if they don’t get updated; we’ll get questions on the elog)

Comments (4)

  1. Stefan Ritt

    I agree that these warning are annoying and need to be fixed. I leave this to KO who introduced this change recently.

  2. Stefan Ritt

    To shed more light on the issue, I did some test today. On my Mac Pro M1, 16 GB ram, compiled with -O2, using “lowlevel/produce.cxx” to send various data to SYSTEM buffer, no consumer active. Here are the results in MB/sec:

    Cache size -> V Event size 0 100k 1M 10M
    100 177 870 910 913
    1000 1524 4900 5530 5530
    10000 9800 8700 11600 10300
    100000 52200 48000 49400 20700
    1000000 52200 52200 52200 45000

    My observations:

    • At an event size of 100 Bytes, there is a significant improvement between no write cache and 100k write cache. The difference between 100k and 10M is marginal
    • At event sizes above 10k, the write cache does not matter at all
    • In the above table, most numbers are above 1 GB/s, much more that any experiment will generate

    My conclusions:

    • I cannot confirm that a cache size of 10MB is much better than 100kB. The maximum effect I see is maybe 10%. I vaguely remember I did that test some 30 years ago and came to the same conclusion. So apparently the ratio of memcpy vs. semaphore locks stayed konstant over the last decades.
    • We only have to worry about the write cache for experiments with small event sizes

    Our options:

    1. Move the minimal cache size back to 100kB, which gets rid of the errors we see on other experiments
    2. I change mfe.cxx such that it increases the cache size for trigger events to 10MB, and to zero for slow control events, then puts this info into the ODB, but just for information.

    Comments?

  3. Log in to comment