<@ULVA73B9P> any benchmark for prefect server. I a...
# ask-community
n
@Marvin any benchmark for prefect server. I am running prefect server on 4cpu 8 gb memory. all cpu is less than 50% usage still can not shedule or add new flow runs. only 7 flows running wiht 7 workers. I setup 20 workers . but can not utilise them because of prefect server unable to do quick run.
m
It appears that there aren't any open GitHub issues specifically discussing benchmarks for Prefect Server performance. However, if your Prefect Server is struggling to schedule or add new flow runs despite having available CPU resources, it might be due to other factors such as database performance, network I/O, or configuration settings that are limiting throughput. Considering that Prefect Server's performance can be influenced by the underlying database and its configuration, make sure that database resources are appropriately provisioned, and that the database is able to handle the number of concurrent connections your workflow requires. If you have not already done so, I would recommend monitoring your database metrics as well and perhaps reaching out to the Prefect community forums or their official support channels for more tailored assistance. They might have experienced similar issues and could offer solutions specific to Prefect's architecture. In the meantime, if you have any specific error messages or logs that you can share, they can be helpful in further diagnosing the issue.
n
@Marvin how to run prefect server with postgress
m
To run Prefect server with PostgreSQL, you'll have to perform some configuration. Here's a brief guide to help you: 1. Ensure PostgreSQL is installed with the
pg_trgm
extension enabled, since Prefect uses it. 2. Set the database connection URL by using
prefect config set
. The connection URL should follow the format:
postgresql+asyncpg://<username>:<password>@<host>:<port>/<database>
. Replace
<username>
,
<password>
,
<host>
,
<port>
, and
<database>
with your PostgreSQL credentials and connection details. Here's an example command to set up the database connection with PostgreSQL:
Copy code
sh
prefect config set PREFECT_API_DATABASE_CONNECTION_URL="<postgresql+asyncpg://postgres:yourTopSecretPassword@localhost:5432/prefect>"
In this example: - Replace
postgres
with your PostgreSQL username. - Replace
yourTopSecretPassword
with your actual password. - The database is assumed to run on the same machine (
localhost
) and listen to the default PostgreSQL port (
5432
). For the full details and any extra configurations, you can refer to the Prefect documentation on hosting and database settings. Please ensure your PostgreSQL is properly set up and accessible before attempting to connect Prefect to it.