marsupialtail commented on PR #13640:
URL: https://github.com/apache/arrow/pull/13640#issuecomment-1227765779

   Really hope can pass CI now, this is a script you can use to test 
performance:
   ```
   SIZE = 1024 * 1024
   N = 100 * 32
   import time
   import os
   import pyarrow.fs as fs
   #da  = fs.LocalFileSystem(use_directio=True)
   da  = fs.LocalFileSystem(use_directio=True)
   #da  = fs.LocalFileSystem(reuse=False)
   s = da.open_output_stream("bump")
   a = bytes("1","utf-8") * SIZE
   start = time.time()
   for i in range(N):
       s.write(a)
   s.close()
   os.sync()
   print(time.time() - start)
   ```
   On my NVME SSD direct IO is about 50% faster than non-direct IO writing this 
file. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to