简体   繁体   中英

How to determine optimal fault tolerant memory for filex?

in filex example file , given to fx_fault_tolerant_enable function RAM buffer in size of FX_FAULT_TOLERANT_MAXIMUM_LOG_FILE_SIZE which is 3K.

I would want to reduce this define and the RAM buffer as much as I can.

What are the parameters I need to decide what is the needed size for FX_FAULT_TOLERANT_MAXIMUM_LOG_FILE_SIZE ? can I reduce the RAM buffer more?

I suppose it should be some function of how many open files I have in parallel and how much I am writing to them but I don't know how to really calculate it.

EDIT

In the read fault tolerance function it looks like it is expected that the cache size is at least the size of the log in the file system, for example if FX_FAULT_TOLERANT_MAXIMUM_LOG_FILE_SIZE is 3K so the cache is also at least 3K. Am I right??

The requirement of RAM buffer size for fault tolerant feature is at least bytes_per_sector. The symbol FX_FAULT_TOLERANT_MAXIMUM_LOG_FILE_SIZE is not user configurable. It covers the worst case of file renaming. The log file will occupy 3K data in the file system. Do you intend to save disk usage for fault tolerant?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM