Open n3011 opened 1 year ago
Pre and post-request processing for authentication might be causing overhead. I'll check.
@mlflow/mlflow-team Please assign a maintainer and start triaging this issue.
Hey @n3011 @harupy ! I came across the issue and took some time to debug the server's request handling. It turns out that checking password hash is what takes the majority of the time for a request to be processed. Seems to be functioning as designed, rather than an unintended bug?
thanks for the response @lightnessofbein I face the same issue since basic http authentication enabled, mlflow client needs way more time to call e.g. mlflow.models.get_model_info() Does mlflow needs to authenticate everytime something is fetched from the database ?
I have the same issue. Mlflow 2.14.1 and remote postgres database. I have debug that a bit and it looks like for every Server UI click on for example on experiment there is a couple of requests to tracking server (let say around 10). Every time hash function is executed but also every time session is created. And it looks like, creation of session takes more time. In my case When I tested that locally hash function took around 0.07 second and session open took around 0.16 second. When we multiply that by 10 it tooks 2.5 second only for authentication and auth requests.
Issues Policy acknowledgement
Willingness to contribute
No. I cannot contribute a bug fix at this time.
MLflow version
System information
Describe the problem
When enabling
basic_auth
, MLflow is very slow, 40X to 90X slower than without using authentication.Here is a script to reproduce the runtime (assuming you have a mlflow instance running at port 5000)
Runtime, when starting MLflow server using
mlflow server
Runtime when starting MLflow server using
mlflow server --app-name basic-auth
What component(s) does this bug affect?
area/artifacts
: Artifact stores and artifact loggingarea/build
: Build and test infrastructure for MLflowarea/docs
: MLflow documentation pagesarea/examples
: Example codearea/gateway
: AI Gateway service, Gateway client APIs, third-party Gateway integrationsarea/model-registry
: Model Registry service, APIs, and the fluent client calls for Model Registryarea/models
: MLmodel format, model serialization/deserialization, flavorsarea/recipes
: Recipes, Recipe APIs, Recipe configs, Recipe Templatesarea/projects
: MLproject format, project running backendsarea/scoring
: MLflow Model server, model deployment tools, Spark UDFsarea/server-infra
: MLflow Tracking server backendarea/tracking
: Tracking Service, tracking client APIs, autologgingWhat interface(s) does this bug affect?
area/uiux
: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/docker
: Docker use across MLflow's components, such as MLflow Projects and MLflow Modelsarea/sqlalchemy
: Use of SQLAlchemy in the Tracking Service or Model Registryarea/windows
: Windows supportWhat language(s) does this bug affect?
language/r
: R APIs and clientslanguage/java
: Java APIs and clientslanguage/new
: Proposals for new client languagesWhat integration(s) does this bug affect?
integrations/azure
: Azure and Azure ML integrationsintegrations/sagemaker
: SageMaker integrationsintegrations/databricks
: Databricks integrations