Re: [Cppcms-users] Big cache
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-12-27 08:24:25
|
On the second thought I maybe misunderstood your question. How do you know that cache_limit is 1G? 1. First of all what is the average size of your objects in cache? Set cache_limit = 1G / avr(object_size). 2. There is a process shared cache that uses shared memory and its size is defined by memory size, it is little bit less efficient than thread shared cache because of less efficient memory allocation algorithm (in 1.0.2 but improved in trunk) but in general you should not feel it. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Artyom Beilis <art...@ya...> >To: "cpp...@li..." <cpp...@li...> >Sent: Thursday, December 27, 2012 10:18 AM >Subject: Re: [Cppcms-users] Big cache > > >See, you don't cache objects of 500MB in memory... > >Caching system is designed for pages and other objects of reasonable size >that their generation is costly, > >Also remember that saving objects to cache and using it from cache involves some >memcpy... and than serving. > >if you want to serve huge files/data (and cache them) it is much better to use file system for this. > >Put them on disk and tell lighttpd, nginx or even apache to serve them, it would do it much better. > >For example lighttpd would know to transfer them using sendfile directly from disk to socket >without even copying the data to user space. > >Artyom Beilis >-------------- >CppCMS - C++ Web Framework: http://cppcms.com/ >CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > > >>________________________________ >> From: Sergey Shutov <ser...@gm...> >>To: cpp...@li... >>Sent: Thursday, December 27, 2012 6:44 AM >>Subject: [Cppcms-users] Big cache >> >>Artyom Hi. Did you know about redis db? In one high load project i use redis db >>for caching. I can use native cache in my application? I have this question >>because if i store some 500 MB or 1GB :) and when memory is full it may breaks. >>Or better use cppcms_scale? But how i know how match 500 mb equals cache_limit? >> >> >>------------------------------------------------------------------------------ >>Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >>MVPs and experts. ON SALE this month only -- learn more at: >>http://p.sf.net/sfu/learnmore_122712 >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >------------------------------------------------------------------------------ >Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >MVPs and experts. ON SALE this month only -- learn more at: >http://p.sf.net/sfu/learnmore_122712 >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |