Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

Bypass system disk cache

Thread view: 
mrfchung@gmail.com - 07 Aug 2007 10:19 GMT
Hi Guys

I have a question:

I have a project that with file IO but need to bypass the system disk
cache.

Is there anyway that I can disable the system disk cache (to the
particular drive or file) ?

If it is not possible, how can I bypass the cache to the file?

Thanks a lot on advance.

Frankie Chung
bugbear - 07 Aug 2007 12:50 GMT
> Hi Guys
>
[quoted text clipped - 7 lines]
>
> If it is not possible, how can I bypass the cache to the file?

Even if this were possible on the OS ("fairly unlikely")
it's "extremely unlikely" that such controls are available
in a platform portable language like java.

Perhaps if you tell us your motivation for this
unusual request, someone can help you further.

 BugBear
Roedy Green - 07 Aug 2007 15:26 GMT
>I have a question:
>
[quoted text clipped - 5 lines]
>
>If it is not possible, how can I bypass the cache to the file?

That will require platform specific code, if it is possible at all.
The trend in OSes is to give individual apps less and less power to
control the OS.  If you can find some method in the C++ library, use
it and hook it up to Java with JNI.

http://mindprod.com/jgloss/jni.html
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

David Gourley - 07 Aug 2007 22:51 GMT
> Hi Guys
>
[quoted text clipped - 11 lines]
>
> Frankie Chung

I haven't done this kind of thing for a while.  But in my murky past you
often wanted to do this for databases (because they had their own
caching mechanism which worked better than "simple" file system cache).
Can you mount a raw disk partition on your operating system? (because
this will usually bypass the file system cache) (but add some other
headaches for your code...)

Dave
Lew - 07 Aug 2007 23:31 GMT
mrfchung@gmail.com wrote:
>> Is there anyway that I can disable the system disk cache (to the
>> particular drive or file) ?
>>
>> If it is not possible, how can I bypass the cache to the file?

> I haven't done this kind of thing for a while.  But in my murky past you
> often wanted to do this for databases (because they had their own
> caching mechanism which worked better than "simple" file system cache).
> Can you mount a raw disk partition on your operating system? (because
> this will usually bypass the file system cache) (but add some other
> headaches for your code...)

Proving again that it's a system configuration matter, not a Java matter.

Any OS that you would seriously consider for a high-volume server supports raw
I/O.

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.