Comments (3)
@zamazan4ik
I could completely make sense what you suggested, it can be optimized the following approach. But I'm not sure how can be improved it such that process.
https://stackoverflow.com/questions/13881292/what-information-does-gcc-profile-guided-optimization-pgo-collect-and-which-op
We also can find the detail of this mechanisms on this paper.
https://people.freebsd.org/~lstewart/articles/cpumemory.pdf section7.4.
In generally if it could be improve the performance which you expected, we could be written the following a building process as a tips in README instead of providing the optimized binary. Only we prefer to build such the way at users own risks.
compile with fprofile-generate
% pwd
/home/u5surf/nginx
% CC=gcc ./auto/configure --with-cc-opt='-fprofile-generate -fprofile-dir=./objs' --with-ld-opt='-lgcov' --add-module=../nginx-module-vts
% make
test a several cases
% pwd
/home/u5surf/nginx-module-vts
% sudo PATH=/home/u5surf/nginx/objs:$PATH prove -r t/000.display_html.t
...(during runtime it records coverage data into .gcda files)
recompile with fprofile-use
% pwd
/home/u5surf/nginx
% CC=gcc ./auto/configure --with-cc-opt='-fprofile-use -fprofile-dir=../nginx-module-vts/objs' --with-ld-opt='-lgcov' --add-module=../nginx-module-vts
% make
from nginx-module-vts.
@zamazan4ik Thanks interesting suggestion.
I consider that such optimize through this module might be limited. At first this module is a kind of nginx module, in short the build process is just nginx one, that might only the optimization of nginx.
We should suggest such build process to nginx developers instead this module as formally.
from nginx-module-vts.
Excuse me for the so late response - holidays, you know :)
In generally if it could be improve the performance which you expected, we could be written the following a building process as a tips in README instead of providing the optimized binary. Only we prefer to build such the way at users own risks.
I agree with your suggestion. Having such documentation somewhere (like in the README file) is a good thing to the users to have.
I have the following suggestions for your documentation about PGO:
- Clang also supports PGO so there is no need to bind the PGO documentation only to the GCC compiler. PGO with Clang can be enabled with the same
-fprofile-generate
/-fprofile-use
flags. - It would be great if in the documentation you put information about the actual performance wins with PGO in the VTS module. But for that, we need to perform some benchmarks.
Here I gathered some PGO-related documentation examples:
- ClickHouse: https://clickhouse.com/docs/en/operations/optimizing-performance/profile-guided-optimization
- Databend: https://databend.rs/doc/contributing/pgo
- Vector: https://vector.dev/docs/administration/tuning/pgo/
- Nebula: https://docs.nebula-graph.io/3.5.0/8.service-tuning/enable_autofdo_for_nebulagraph/
- GCC: Official docs, section "Building with profile feedback"
- Clang:
- Rustc: https://rustc-dev-guide.rust-lang.org/building/optimized-build.html#profile-guided-optimization
- tsv-utils: https://github.com/eBay/tsv-utils/blob/master/docs/BuildingWithLTO.md
from nginx-module-vts.
Related Issues (20)
- Question about nginx_vts_upstream_requests_total metric HOT 1
- Sorting HOT 1
- Change defoult sorting. HOT 1
- buffer size may be too small HOT 2
- Release a new version HOT 2
- No such file or directoryodule-vts/config: line 2: auto/have HOT 2
- Label metrics with jsonrpc method HOT 16
- the status of server is not current when max_fails = 0 HOT 4
- /status/format/json not served after clean installation HOT 1
- VTS doesn't support query string encoding HOT 1
- I encountered the following Syntax error while compiling the vts source code in windows environment HOT 2
- [emerg] 1#1: module "/etc/nginx/modules/ngx_http_vhost_traffic_status_module.so" version 1022001 instead of 1025002 in /etc/nginx/nginx.conf:5 HOT 1
- periodic cleanup of shared memory? HOT 2
- Question - time window of statistics HOT 1
- Module bug HOT 4
- Will the request fail? 'ngx_slab_alloc() failed: no memory in vhost_traffic_status_zone' HOT 1
- 2024 Can this tool support TCP monitor? HOT 1
- shm_add_upstream error HOT 1
- how to disable upstream statistics collection? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-module-vts.