I use uftproxyd 4.9.7 in an IoT environment on embedded systems with typically limited RAM.
I have now discovered that the proxy allocates a lot of memory statically.
The size tool lists a BSS size of ~62.2 MB for my platform (ARM Cortex A7):
size uftpproxyd
text data bss dec hex filename
108725 1132 65284176 65394033 3e5d571 uftpproxyd
This is probably due to the following definition of header uftp.h (line 276)
#define MAXPROXYDEST 1000
Is there a documentation for this define?
How would a configuration look like if I only want to support
two proxy servers and a maximum of 20 clients?
Regards,
Andreas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There isn't any specific documentation for this #define, but what this value does it specify the maximum number of clients that a sngle proxy may support.
In your case the number of supported clients is much smaller, so you can shrink this value to whatever value makes sense for you. For example, if you were to set it to 100, the BSS size would shrink to around 6MB.
Regards,
Dennis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your reply. I've also tried a few values, which allowed me to reduce the BSS size considerably. For me it was still important to understand whether there might still be dependencies in the background and whether they had to be taken into account.
If the value only corresponds to the number of clients, then that is OK for me and I will patch the code accordingly.
Regards,
Andreas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Dennis,
I use uftproxyd 4.9.7 in an IoT environment on embedded systems with typically limited RAM.
I have now discovered that the proxy allocates a lot of memory statically.
The size tool lists a BSS size of ~62.2 MB for my platform (ARM Cortex A7):
This is probably due to the following definition of header uftp.h (line 276)
Is there a documentation for this define?
How would a configuration look like if I only want to support
two proxy servers and a maximum of 20 clients?
Regards,
Andreas
Andreas,
There isn't any specific documentation for this #define, but what this value does it specify the maximum number of clients that a sngle proxy may support.
In your case the number of supported clients is much smaller, so you can shrink this value to whatever value makes sense for you. For example, if you were to set it to 100, the BSS size would shrink to around 6MB.
Regards,
Dennis
Hi Dennis,
Thanks for your reply. I've also tried a few values, which allowed me to reduce the BSS size considerably. For me it was still important to understand whether there might still be dependencies in the background and whether they had to be taken into account.
If the value only corresponds to the number of clients, then that is OK for me and I will patch the code accordingly.
Regards,
Andreas