|
From: | silvioprog |
Subject: | Re: [libmicrohttpd] MHD_create_post_processor: recommended buffer size for large posts |
Date: | Fri, 31 Mar 2017 12:27:56 -0300 |
#if defined(__ANDROID__)
# define BF_HTTPSRV_POST_BUF_SIZE 1024 /* 1 kB */
#elif defined(WIN32)
# define BF_HTTPSRV_POST_BUF_SIZE 32768 /* 32 kB */
#else
# define BF_HTTPSRV_POST_BUF_SIZE 65536 /* 64 kB */
#endif
Hi Silvio,
Sidenote: SVN is not updated any more, latest version is on git:
https://gnunet.org/git/libmicrohttpd.git/tree/doc/examples/ largepost.c
"512" is not recommended size, it's just suitable size for example.
Optimal value depends on OS, architecture, amount of available RAM.
You should experiment to find out what is optimal for you.
--
Best Wishes,
Evgeny Grin
On 31.03.2017 6:17, silvioprog wrote:
> Hello dudes,
>
> Looking at MHD examples, it seems the recommended buffer size to specify
> on MHD_create_post_processor() for large uploads is 512:
>
> https://gnunet.org/svn/libmicrohttpd/doc/examples/largepost. c
> <https://gnunet.org/svn/libmicrohttpd/doc/examples/largepost >.c
>
> However, what means large for you? About 100 MB, 1 GB, 10 GB or greater?!
>
> I have a structure that I need to support ~ 5 GB, so I'm planning to use
> 1024, because I want fast transfer using less memory and CPU possible.
> In that case, is 1024 an ideal size?
>
> Thank you!
>
> P.S.: we should specify the size (in MB or GB) that we consider large on
> the example `largepost.c`.
>
> --
> Silvio Clécio
[Prev in Thread] | Current Thread | [Next in Thread] |