3

I'm developing a CppCMS app, for running on my ARM-based custom board. I'm running CppCMS behind Lighttpd using fastcgi. But apparently CppCMS consumes far more memory than Lighttpd does (50+ MB), which comes as a surprise to me.

DISCLAIMER: The memory consumption listed above was obtained using 'ps' applet of busybox, which may have issues regarding the reported memory use. Hence do NOT let my ramblings here discourage you from giving Artyoms excellent CppCMS a spin.

Before digging deeper into this, I would like to hear if anyone has some numbers on "common" consumption of CppCMS as a function of site complexity.

My setup: ARMv5TE, CodeSourcery GCC v 4.3.3, site includes 4 pages, and uses 2 types of forms.

update

I'm running CppCMS 1.0.4.

There is no SQL database, only a very simple C++ datastructure. Performing a "sizeof" on the combined set of objects in the structure is below 1 KiB.

My config-file looks as follows:

"service" : {
        "api" : "http",
        "port" : 8080
},
"security" : {
    "csrf" : {
        "enable" : true,
    }
},
"session" : {  

    "expire" : "renew",  
    "timeout" : 604800,  
    "location" : "client",  
    "client" :      {  
            "hmac" :        "sha1",  
            "hmac_key" :    "............"  
    }      

    } 

The reported 50+ MB memory consumption was dermined running 'ps' command on the deployment linux-box.

4

1 回答 1

2

这取决于您的应用程序、缓存使用情况和许多其他因素。

例如,在这个示例程序中:http ://cppcms.com/wikipp/en/page/benchmarks_all的使用量只有几 MB(包括 lighttpd)。

在某些情况下,它可能会是几 MB,而在某些保存在内存数据库中的情况下,它可能会很大。

此外,了解如何测量应用程序内存消耗也很重要。

于 2013-12-03T13:31:46.617 回答