Hi,<br><br>I have been working on high perf optimisations on a huge adult website (yes this need power too),<br>well when we let the funny thing on the side the "girls" get around 800.000 unique visitors by day<br>
and around 5.000.000 view pages. So they get quite busy with mysql ...<br><br>I naturaly turned to memcache but then tested another simple solution , i just maid a disk based<br>cache that do the same thing as memcache :
<br><br>store(object) write serialized object to disk<br>retrive(object) retrive serialized object from disk<br><br>so <br>select * from a where b<now() - interval 30 min for example<br><br>becomes <br>$cache_key = '';
<br>$cache_time = 30*60;<br><br>($age,$object) = retrive(object);<br>if($age > $cache_time){<br> object = select * from a where b<now() - interval 30 min;<br> store(object);<br>}<br><br>so this was running on all webservers and gently writing stuff to the disk .
<br>unloading the database and speeding the girls up .<br>this resulted in around 5000 small files on the disk (if you count all possible keys combinations)<br><br>this is the setup , now the remark .<br><br>They use linux + xfs there ...
<br>and when i went to the webservers i realized after running the dstat that they was not<br>reading anything on the disk ... all the small files was naturaly cached by the os fs buffers in<br>a nice way . (i added a cron to clean up unused cached files rm where age > 5H) and thats all.
<br><br>On the perfside it resulted to be all in ram so it was fast , it was trivial to setup (compared to memcache)<br>and if a server reboot the cache still on disk and the os was dealing with all the issues no need in any deamon
<br>or whatever , so its realy trivial and robust .<br><br>The purpose of this email is to ask what are the future limitations of my setup ? I mean for the moment it do the <br>job , but where is the gotcha ?<br><br>thanks
<br><br><br><br><br>