If I have a jdk installed on a suse linux box is there some soft of default folder where http files are cached? I know with webstart you can locate some kind of cache folder, wondering if that cache is similar in nature to the cache for web browsers.
I am running a tomcat instance and would like to know how to cache a file to speed up requests.
I'm confused. Are you running Tomcat on this Linux box? Or is Tomcat running elsewhere and you are running a browser on a Linux box and accessing Tomcat? If the latter, then the browser should automatically cache the file somewhere in a hidden directory in your home directory (exact location depends on the browser).
Tomcat etc on a linux box. A method inside my tomcat server is http getting another url (not hosted by me, an external url) through URL and URLConnection.
This URL connection response is large, slow and I want to cache it. I think the only way to do it is to use squid to cache the response.
Tomcat is a server and does not cache anything. The clients have to do their own caching, or (as you mentioned), access via a caching proxy, such as squid. Java itself has no caching capabilities.
One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
luke swagger
Greenhorn
Joined: Dec 22, 2011
Posts: 3
posted
0
Hello,
I need to do some speed tests and benchmarks on my hard disk drive. Unfortunately the files being written/read are being cached, (normally it's a good thing, but not when I need to accurately measure the performance of the harddisk). I looked in 'mount' options, 'hdparm', even the kernel configuration. Unfortunately I couldn't find anything. I feel that it should be a simple switch somewhere, but I'm just missing it.
Please, if any one knows how to disable the cache, I'd appreciate the help. Even if it takes to hack the kernel, I have no problem.
Thanks in advance,
The Gold Standard for Linux-based disk performance testing is Bonnie.
However, Bonnie is designed specifically to test the physical hard drive and filesystem performance.
If you're looking for performance specific to a single application system, such as Tomcat, then you need to construct a test framework that mimics the production loads as accurately as possible. Programs such as jMeter can help there.
evan tanski
Greenhorn
Joined: Jan 06, 2012
Posts: 5
posted
0
Linux loves to cache I/O. It likes it so much, that it’ll try to cache virtually everything you throw at it. Generally, this is a good thing. Caching files means that the file that’s on the hard disk is placed inside the system memory.