intel / isa-l

Intelligent Storage Acceleration Library
Other
951 stars 300 forks source link

Why does the encoding time increase dramatically when k increases from 34 to 35? #152

Open yaoqr15 opened 4 years ago

yaoqr15 commented 4 years ago

My setting: 64MiB chunk size. I test from 32+4 to 35+4 . CPU: Intel(R) Xeon(R) Silver 4110, Memory 256 GiB, Ubuntu 16.04. The results are as follows:

yaoqr@node-NF5280M5:~/Code/test$ ./encode 32 4
encode with avx2: 514.764
yaoqr@node-NF5280M5:~/Code/test$ ./encode 33 4
encode with avx2: 594.76
yaoqr@node-NF5280M5:~/Code/test$ ./encode 34 4
encode with avx2: 863.95
yaoqr@node-NF5280M5:~/Code/test$ ./encode 35 4
encode with avx2: 1583.09

The time is measured in ms. Anybody knows the reason why the time jumps too fast from k=34 to k=35? Thanks!!

gbtucker commented 4 years ago

I'm not sure but perhaps the prefetchers have gotten to a point of confusion. If your application is doing this in practice I would measure the various cache hit rates and start experimenting with adding SW prefetch instructions or reorganize data into smaller sub-blocks.

yaoqr15 commented 4 years ago

I'm not sure but perhaps the prefetchers have gotten to a point of confusion. If your application is doing this in practice I would measure the various cache hit rates and start experimenting with adding SW prefetch instructions or reorganize data into smaller sub-blocks.

Thanks for your reply! I surmised that the phenomenon may be related to the cache in CPU before asking. Your suggestion is very helpful.