Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate query information #495

Closed
pnorman opened this issue Jan 8, 2021 · 2 comments
Closed

Generate query information #495

pnorman opened this issue Jan 8, 2021 · 2 comments

Comments

@pnorman
Copy link
Collaborator

pnorman commented Jan 8, 2021

It's been awhile since we've looked at OpenStreetMap Carto performance and I'd like to see what's taking the most times.

Can this shell script be run on rhaegal at some point during the day when it's overloaded?

for i in `seq 1 360`; do 
psql -AtqX -d postgres -c "COPY (SELECT pid, NOW(), NOW()-query_start AS query_duration, query FROM pg_stat_activity WHERE datname = 'gis' AND pid != pg_backend_pid() AND state != 'idle') TO STDOUT;" >> query_log.txt;
sleep 5;
done

It should take about one hour and generate very little load.

@tomhughes
Copy link
Member

You can grab it at https://tomh.dev.openstreetmap.org/query_log.txt.gz.

I ran it a bit later in the day then I intended so shout if you need e to grab it again though it will have to wait until Monday to get the higher weekday load.

@pnorman
Copy link
Collaborator Author

pnorman commented Jan 8, 2021

Looks good - it lets me get the layers which I can take back to osm-carto devs.

From the operations side, the main takeaway is that the osm2pgsql updates are small compared to rendering, which is no surprise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants