title: cudaMemcpy too slow
body: <p>I use <code>cudaMemcpy()</code> one time to copy exactly 1GB of data to the device. This takes 5.9s. The other way round it takes 5.1s. Is this normal?<br> Does the function itself have so much overhead before copying?
  Theoretical there should be a throughput of at least 4GB/s for the PCIe bus.<br>
  There are no memory transfers overlapping because the Tesla C870 just does not support it. Any hints?</p>
  
  <p>EDIT 2: my test program + updated timings; I hope it is not too much to read!<br>
  The <code>cutCreateTimer()</code> functions wont compile for me: 'error: identifier "cutCreateTimer" is undefined' - this could be related to the old cuda version (2.0) installed on the machine
  <br></p>
  
  <pre><code> __host__ void time_int(int print){
  static struct timeval t1; /* var for previous time stamp */
  static struct timeval t2; /* var of current time stamp */
  double time;
  if(gettimeofday(&amp;t2, 0) == -1) return;
  if(print != 0){
    time = (double) (t2.tv_sec - t1.tv_sec) + ((double) (t2.tv_usec - t1.tv_usec)) / 1000000.0;
    printf(...);
  }
  t1 = t2;
  }
  
  main:
  time(0);
  void *x;
  cudaMallocHost(&amp;x,1073741824);
  void *y;
  cudaMalloc(&amp;y, 1073741824);
  time(1);
  cudaMemcpy(y,x,1073741824, cudaMemcpyHostToDevice);
  time(1);
  cudaMemcpy(x,y,1073741824, cudaMemcpyDeviceToHost);
  time(1);
  </code></pre>
  
  <p>Displayed timings are: <br>
  0.86 s  allocation<br>
  0.197 s first copy<br>
  5.02 s  second copy<br>
  The weird thing is: Although it displays 0.197s for first copy it takes much longer if I watch the program run.</p>