http://bit.ly/fjMoS Read that, about caching files. Is it a good idea? or is it a system resourse hog. If you are making like a list of 10 things with description. Nothing too big.
http://bit.ly/fjMoS Read that, about caching files. Is it a good idea? or is it a system resourse hog. If you are making like a list of 10 things with description. Nothing too big.
I can't read the article at the moment (chrome keeps trying to translate everything into german), but I know that caching uses a lot of resources (a lot of free hosting suspensions are from caching scripts)
~Callum
I can customise your phpBB board. Send me a PM.
lynxphp - info, tutorials and scripts
"A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."
I'm not clicking on that link.
Show us the real URL.
This is the real URL, not that you should really be worrying about it: http://www.gayadesign.com/diy/cachin...l-data-in-php/
Depending upon how extensively you use caching, it is very possible that you will overrun your resource limit and land yourself a suspension.
Last edited by lemon-tree; 08-21-2010 at 11:28 AM.
Thanks lemon. I never click on shortened URLs. Way too much possibility for a hidden affiliate/referral link, and/or malicious stuff that could start attacking / attemping to attack my system (granted I am running linux, we can still get infected with linux viruses/malware).
Last edited by dWhite; 08-21-2010 at 11:32 AM.
Gotcha, thanx for the heads up.Won't be doing that now. I only looked into it to see if it helps limit the strain on the database query. Thanx. And yeah lol didn't want to alarm anyone with short url my bad.
Well, I am using caching on my phpbb site and it is not suspended till now.May be because it has only four posts and four members. :D
Well seriously if I deploy any web application(Specifically Joomla, WordPress or Zend framework project) that uses file based caching can it be a resource hogger?Caching saves us resources then how it can be a resource hogger?
I have seen high resource usage suspension of many WordPress users because of the plugins they use.
Liked this? Click on theicon on the bottom of post to make me
.
During the process of building the cache it uses up a lot resources (CPU mainly, but also ram), depending on how much content has to be added in the same run, and I'd assume a bit on how the caching is actually done.
Once the content is added to cache, the resources they save is mainly bandwidth, and it may speed up the page load for the end viewer a little, often not really noticable.
Do you have trouble reaching your site?
Check here first: News and Announcements
Don't forget that x10hosting has an irc server as well. Come and join the fun
server: irc.x10hosting.com, main channel: #x10hosting
There's a lot helpful users there if need help building your site
It's not so much that caching requires more resources as it trades space for another resource, such as (processor) time or bandwidth.
In storing and reusing the results of (expensive) computations, additional space is used but time can be saved; PHP accelerators are an example of this, as is memoization. As the gaps between processor and memory performance and processor and I/O performance increase (processors have been outstripping the other two), space becomes more and more valuable. Consequently, computational tasks must be correspondingly more expensive to make caching them worthwhile. Due to PHP's architecture (at the end of a script's execution, all data is discarded), cached data can't be stored in memory, so some form of persistent storage must be used instead. Disk storage speed is extremely slow relative to processor speed, so that option usually isn't worth it, but relegating storage to a DB (which can be forced to store the data in memory) may be viable.
As for network caching, the factors affecting its utility are network latency (~ 10-100ms) and goodput (~ 128kB/s-1GB/s for high speed, though not many connections will run at the upper end of that range), disk access time (~ 6-26ms) and throughput (~ 50-400 MB/s), available storage space (currently unmetered, so I'm not certain what the limits are) and the hit rate. From the first four statistics, we can expect that fetching data from disk is (very) roughly 10-20 times as fast as from the network (which puts an upper limit on how much caching will improve performance), with latency being comparable. The statistical ranges given reflect the variance between hosts; on a given host, the statistics will be more consistent. Hit rate will vary wildly, depending on storage space and the exact order that items are requested. Hit rate will scale the upper limit on performance increase; with a hit rate of (e.g.) 50%, we should expect at most a 5-to-10-fold performance increase from network caching. If you're fetching small amounts of data (on the order of 10**5 B, roughly), service time won't be much improved by caching; if it takes more than a few seconds for the server to fetch data per request, caching should give a noticeable improvement in performance.
Network caching is a subset of caching data from I/O bound processes. Caching search results is another, which can be advantageous if there is a large amount of data that must be examined for each search.
Your best bet is to design your site without caching, but make it easy to add it later on, if necessary. It's best to optimize later in the development process, once you've got a solid design and a working system.
Last edited by misson; 08-23-2010 at 02:31 AM.
Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.Misson, not Mission.
Last edited by callumacrae; 08-23-2010 at 09:30 AM.
I can customise your phpBB board. Send me a PM.
lynxphp - info, tutorials and scripts
"A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."