On 06/16/2016 02:25 AM, Per Jessen wrote:
One thing to look into is - why aren't those files being cached? That would appear to be because the device is network attached. I am still working on this.
Cached where? I've mentioned the kernel caching inodes and pathname segments, a feature that has been around for yonks. But the file contents are accessed in the application. Now don't forget that web applications are not telnet session, the logic is that they are connectionless (unless you have, for example a java/JavaScript applet doing things). Open, download page, close. Client renders. Web front end fires up the application, it does its stuff and exits. That's the basic model. Yes there are ways to amplify that; using a sql database as a data store is one, the database is long lived, and does its own caching. There are tricks that can be performed on a dedicated server with lots of memory that keep not only the interpreter in core across transactions but increase the latency of the data files in the paging system. While this makes sense in heavily provisioned servers, its not practical in a desktop. Another optimization the BigName sites use is to have a separate server for images, CSS and JavaScript, and since those get used by all calls that machine can be set to leave these files in core and served up very fast across transactions from many clients. So comparing a single server with the BigName sites like Wikipedia isn't fair. And don't forget that some client applications also do file caching. There are also tricks a web application developer can play with the Apache (or other) server to keep a connection open for a few milliseconds. This makes sense, sometimes, if a single client is going to make another call, which is possible with some embedded apps/scriplets. But most of these optimizations are 'statistical', that is they make sense for a multi-user server being hit from many clients. The points I’m making here are - there are many types of caching going on and there’s nothing to say they aren't running interference with one another - when you say "caching", be more specific - the optimizations which make sense for a heavily traffics server don't apply in the small scale Finally, I'd point out that the MediaWiki code used by Wikipedia is available for inspection. If there's magic smoke in there you can see it. I've not looked at or for the Wordpress code but its there. As is, I should mention, an incredible amount of stuff on the optimization of web services and web servers, some of which I've used myself, some of which I've worked with for clients and lot of which you'll find in books on site development. Mine lead towards Ruby and erl with few Python ones. I don't have any texts on PHP. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org