upenn-acg / ocolos-public

Ocolos is the first online code layout optimization system for unmodified applications written in unmanaged languages.
BSD 2-Clause "Simplified" License
49 stars 14 forks source link

Performance doesn't seem to be improving #8

Closed lyf-g closed 8 months ago

lyf-g commented 8 months ago

After running the program and comparing it, I found that the performance has hardly improved. Could you please help me find out the reason? When I looked at the data from the runtime console, I noticed several suspicious things:

  1. BOLT-WARNING: split function detected on input : _ZL28delete_dictionary_tablespacev.cold/1. The support is limited in relocation mode.
  2. PERF2BOLT: wrote 16614 objects and 0 memory objects to /home/lyf/Desktop/ocolos-data/perf.fdata I looked at the sysbench_output.txt file and found that the performance dropped after 20 seconds and improved again after 130 minutes, but the performance was the same as when I started: [ 4s ] thds: 16 tps: 2787.88 qps: 33449.53 (r/w/o: 27874.77/0.00/5574.75) lat (ms,95%): 8.90 err/s: 0.00 reconn/s: 0.00 [ 26s ] thds: 16 tps: 1918.98 qps: 23029.77 (r/w/o: 19191.81/0.00/3837.96) lat (ms,95%): 12.08 err/s: 0.00 reconn/s: 0.00 [ 167s ] thds: 16 tps: 2628.97 qps: 31538.64 (r/w/o: 26280.70/0.00/5257.94) lat (ms,95%): 8.74 err/s: 0.00 reconn/s: 0.00 I have added these two files to the attachment. Hope to get your help. sysbench_output.txt runtime_console_infomation.txt
lyf-g commented 8 months ago

i rebuild mysql and after executing ./tracer anage,i got followering error: Error reading BOLT data input file: line 2, column 17: malformed field PERF2BOLT-ERROR: failed to match build-id from perf output. This indicates the input binary supplied for data aggregation is not the same recorded by perf when collecting profiling data, or there were no samples recorded for the binary. Use -ignore-build-id option to override. Could you please help me find out the reason? Hope to get your help.

lyf-g commented 8 months ago

i rebuild mysql and after executing ./tracer anage,i got followering error: Error reading BOLT data input file: line 2, column 17: malformed field PERF2BOLT-ERROR: failed to match build-id from perf output. This indicates the input binary supplied for data aggregation is not the same recorded by perf when collecting profiling data, or there were no samples recorded for the binary. Use -ignore-build-id option to override. Could you please help me find out the reason? Hope to get your help.

i add the flag "-ignore-build-id",but performance still hasn't improved.

zyuxuan0115 commented 8 months ago
PERF2BOLT-ERROR: failed to match build-id from perf output. This indicates the input binary supplied for data aggregation is not the same recorded by perf when collecting profiling data, or there were no samples recorded for the binary. Use -ignore-build-id option to override.

This error message should not be there if you didn't turn on the continuous optimization mode. Please check if your perf.data in your tmp_data_dir is stale. I suspect you use the stale perf.data with your newly generated mysqld.

Also, in your tmp_data_dir, there should be a mysqld.bolt binary. (1) Copy that mysqld.bolt to /usr/local/mysql/bin/ (or your mysql root dir) (2) run mysqld.bolt with /usr/local/mysql/bin/mysqld.bolt --user=ocolos --port=3306 --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=ocolos.err --pid-file=ocolos.pid (3) after mysqld.bolt is successfully setup, in another terminal, run sysbench's read only workload first using this command and then using this command

If the performance of the BOLTed binary is not better than the original one, it means BOLT cannot improve the performance of mysqld on your machine.

lyf-g commented 8 months ago
PERF2BOLT-ERROR: failed to match build-id from perf output. This indicates the input binary supplied for data aggregation is not the same recorded by perf when collecting profiling data, or there were no samples recorded for the binary. Use -ignore-build-id option to override.

This error message should not be there if you didn't turn on the continuous optimization mode. Please check if your perf.data in your tmp_data_dir is stale. I suspect you use the stale perf.data with your newly generated mysqld.

Also, in your tmp_data_dir, there should be a mysqld.bolt binary. (1) Copy that mysqld.bolt to /usr/local/mysql/bin/ (or your mysql root dir) (2) run mysqld.bolt with /usr/local/mysql/bin/mysqld.bolt --user=ocolos --port=3306 --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=ocolos.err --pid-file=ocolos.pid (3) after mysqld.bolt is successfully setup, in another terminal, run sysbench's read only workload first using this command and then using this command

If the performance of the BOLTed binary is not better than the original one, it means BOLT cannot improve the performance of mysqld on your machine.

Thank you very much! When I extend the duration of sysbench, there will be a boost at around 230s. Maybe it wasn't long enough.