سؤال

I do some experiments on databases. In this case, every query selects everything from one of the tables of the TPCH Benchmark (select * from table;). Before and after each query I parse /proc/[pid]/io, where [pid] is the process of the database. The difference of those values should tell me about the IO of a query. This is a typical output for MySQL (seconds, MB):

      Query         time          RCHAR        WCHAR   READ_BYTES  WRITE_BYTES CANCELLED_WB
query1.sql|       0.005|       0.00234|     0.00245|     0.00391|     0.00000|     0.00000
query2.sql|       0.008|       0.00043|     0.00058|     0.00391|     0.00000|     0.00000
query3.sql|       0.041|       1.37217|     1.37296|     1.37891|     0.00000|     0.00000
query4.sql|       0.270|      23.41719|    23.64796|    23.44531|     0.00000|     0.00000
query5.sql|       0.346|      23.43413|    23.58974|    23.46484|     0.00000|     0.00000
query6.sql|       1.413|     113.77629|   115.76173|   113.89453|     0.00000|     0.00000
query7.sql|       1.792|     140.49537|   168.27847|   140.64062|     0.00000|     0.00000
query8.sql|       8.847|     614.04820|   759.00238|   614.65625|     0.00000|     0.00000
   Overall|      12.738|     916.54611|  1091.65626|   917.48828|     0.00000|     0.00000

I wonder where the WCHAR (write char) values come from. My queries 'read everything' instead of 'write anything' (Since 'WRITE_BYTES' is null, there is actually no disk-write, but writes to cache/buffer?). What do I miss here?

هل كانت مفيدة؟

المحلول

I think TTY io (and maybe networking?) is included in the WCHAR, but the WRITE_BYTES only counts pages written to disk.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top