title: fread slow performance in OpenMP threads
body: <p>I use Intel Xeon x2 (24 kernels) and Windows Server 2008.<br/>
  Trying to parallelize my c++ program. Template code here:</p>
  
  <pre><code>vector&lt; string &gt; files;
  vector&lt; vector&lt; float &gt; &gt; data; 
  ...
  data.resize( files.size() ); 
  
  #pragma omp parallel for 
  for (int i=0; i&lt;files.size(); i++) { // Files count is about 3000
      FILE *f = fopen(files[i].c_str(), "rb"); 
  
      // every file is about 40 mb
      data[i].resize(someSize);
      fread(&amp;data[i][0], sizeof(float), someSize, f); 
  
      fclose(f);
      ...
      performCalculations();  
  }
  </code></pre>
  
  <p>CPU Usage is only from 0 to 5%.<br/>
  When I insert instead of <em>fread(&amp;data[i][0], sizeof(float), someSize, f)</em>:</p>
  
  <pre><code>for (int j=0; j&lt;data.size(); j++) {
      data[i][j] = rand(); 
  }
  </code></pre>
  
  <p>CPU Usage increases to 100%. <br/>
  I already tried to use fstream and WinApi ReadFile, but it didn't take an big effect.</p>
  
  <p>What am I doing wrong? I don't believe that the disk reading can be so slow... </p>