Re:RE: 答复:答复:答复:mmap confusion in lucene

2014-07-16 Thread 308181687
Yes, it 's obviously optimized by jit ‍compiler of hotspot. ‍ -- Original -- From: "Uwe Schindler";; Date: Wed, Jul 16, 2014 05:44 PM To: "java-user"; "'wangzhijiang999'"; Subject: RE: 答复:答复:答复:mmap confusion

RE: 答复:答复:答复:mmap confusion in lucene

2014-07-16 Thread Uwe Schindler
il: u...@thetaphi.de > -Original Message- > From: wangzhijiang999 [mailto:wangzhijiang...@aliyun.com] > Sent: Wednesday, July 16, 2014 11:39 AM > To: java-user; Uwe Schindler > Subject: 答复:答复:答复:mmap confusion in lucene > > Hi Uwe, > Where can find the detail introductio

答复:答复:答复:mmap confusion in lucene

2014-07-16 Thread wangzhijiang999
014 11:10 AM> To: java-user> Subject: 答复:答复:mmap confusion in lucene> > Hi 308181687,> > I also tested in this way. If print every byte, the OS cache will consume> the size of file at last,about 800M.> > for (int j = 0; j < len; ++j){ System.out.println(buff.get());

RE: 答复:答复:mmap confusion in lucene

2014-07-15 Thread Uwe Schindler
t; case. Lucene never does this! The idea behind mmap is to *not copy* the > data and work on the mmapped region directly (using random access). The > OS cache logic will then use statistics about which pages were actually used > and keep them longer in FS cache than those used one time and

答复:答复:mmap confusion in lucene

2014-07-15 Thread wangzhijiang999
-28213 Bremenhttp://www.thetaphi.deeMail: u...@thetaphi.de> -Original Message-> From: wangzhijiang999 [mailto:wangzhijiang...@aliyun.com]> Sent: Monday, July 14, 2014 11:58 AM> To: java-user> Subject: mmap confusion in lucene> > Hi everybody, I found a problem confu

Re:答复:mmap confusion in lucene

2014-07-14 Thread 308181687
-- Original -- From: "java-user@lucene.apache.org wan";; Date: Tue, Jul 15, 2014 10:44 AM To: "java-user"; Subject: 答复:mmap confusion in lucene Hi Uwe, Thank you for always help. For my first testing I am clear of it, it is becuase the O

答复:mmap confusion in lucene

2014-07-14 Thread wangzhijiang999
Bremenhttp://www.thetaphi.deeMail: u...@thetaphi.de> -Original Message-> From: wangzhijiang999 [mailto:wangzhijiang...@aliyun.com]> Sent: Monday, July 14, 2014 11:58 AM> To: java-user> Subject: mmap confusion in lucene> > Hi everybody, I found a problem confused me when I tested

RE: mmap confusion in lucene

2014-07-14 Thread Uwe Schindler
r-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: wangzhijiang999 [mailto:wangzhijiang...@aliyun.com] > Sent: Monday, July 14, 2014 11:58 AM > To: java-user > Subject: mmap confusion in lucene > > Hi everybody,

Re: mmap confusion in lucene

2014-07-14 Thread Robert Muir
Your code isn't doing what you think it is doing. You need to ensure things aren't eliminated by the compiler. On Mon, Jul 14, 2014 at 5:57 AM, wangzhijiang999 wrote: > Hi everybody, I found a problem confused me when I tested the mmap > feature in lucene. I tested to read a file size of

mmap confusion in lucene

2014-07-14 Thread wangzhijiang999
Hi everybody, I found a problem confused me when I tested the mmap feature in lucene. I tested to read a file size of 800M by mmap method like below:   RandomAccessFile raf = new RandomAccessFile(new File(path), "r"); FileChannel rafc = raf.getChannel();ByteBuffer buff = rafc.map(FileCha