LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-26-2005, 08:43 AM   #1
acristescu
LQ Newbie
 
Registered: Oct 2005
Posts: 4

Rep: Reputation: 0
clear or disable file cache


Hi,

I'm trying different methods to optimize a piece of java-written software. So I've setup some test data and processed it using all the methods I wanted to test. The problem is, I'm using the same data (it's a lot of data, hard to replicate) and all the tests after the first run very quickly (much more quickly than normal).

I figured this might be because Linux caches the files the first time they are accessed, so the second, third... tests don't really read the files.

So I searched everywhere trying to find a way to clear this file cache (or as a last result disable the thing), but so far came out with nothing. Can someone help me out of this predicament?
 
Old 10-26-2005, 02:17 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,974
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Hi, and welcome to LQ!

You can't do either to the best of my knowledge..
The only work-around would be to load other stuff
(e.g. run a huge copy, one that exceeds the machines
physical RAM size) and then re-run your test sequence.


Cheers,
Tink
 
Old 10-27-2005, 03:27 AM   #3
acristescu
LQ Newbie
 
Registered: Oct 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks, that's my best hope, I think...

I tried to do a
Code:
Runtime.getRuntime().exec("cat bigfile > /dev/null")
but for whatever reason that takes ages in JAVA. I'm reading a big file with java calls just before each test... the test results are closer to reality now, but I'd still love to have a better method...
 
Old 11-04-2005, 10:25 AM   #4
deep_inp
LQ Newbie
 
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
mount and unmount

If ur dat file is in some other partition
May be mounting and unmounting may help

Cheers
Sandeep
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
clear cache remotely [mozilla] dereko Linux - Software 2 10-11-2005 05:56 AM
Help! Clear web.cache and log files on server DogByte Linux - Newbie 1 09-20-2005 06:51 PM
How do I clear the memory cache on my linux server? robgo777 Linux - Software 2 01-09-2005 01:30 AM
Help me clear ALL dhcp (client) cache! carboncopy Slackware 4 06-28-2004 08:42 AM
Clear cache raysr Linux - Newbie 2 03-26-2004 01:34 AM


All times are GMT -5. The time now is 08:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration