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

Set KFServing default worker to 1 #1106

Merged
merged 1 commit into from Sep 29, 2020
Merged

Set KFServing default worker to 1 #1106

merged 1 commit into from Sep 29, 2020

Conversation

yuzliu
Copy link
Contributor

@yuzliu yuzliu commented Sep 28, 2020

KFServer uses the number of cores on the machine to set the number of process in its tornado service which can delay the initialization time and increase the memory usage a lot.

A local testing suggests that KFServer loaded 64 processes and used more than 500Mb for a simple SKLearn model. Once I set the worker number to 1, the memory usage was reduced to around 100Mb.

[I 200927 18:26:06 kfserver:88] Registering model: mlguild-iris-svm
[I 200927 18:26:06 kfserver:77] Listening on port 8080
[I 200927 18:26:06 kfserver:79] Will fork 0 workers
[I 200927 18:26:06 process:126] Starting 64 processes

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


KFServer uses the number of cores on the machine to set the number of process in its tornado service which can delay the initialization time and increase the memory usage a lot.

A local testing suggests that KFServer loaded 64 processes and used more than 500Mb for a simple SKLearn model. Once I set the worker number to 1, the memory usage was reduced to around 100Mb. 
```
[I 200927 18:26:06 kfserver:88] Registering model: mlguild-iris-svm
[I 200927 18:26:06 kfserver:77] Listening on port 8080
[I 200927 18:26:06 kfserver:79] Will fork 0 workers
[I 200927 18:26:06 process:126] Starting 64 processes
```
@kubeflow-bot
Copy link

This change is Reviewable

@yuzisun
Copy link
Member

yuzisun commented Sep 29, 2020

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yuzisun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yuzisun yuzisun merged commit a0d9bd2 into master Sep 29, 2020
@yuzisun yuzisun deleted the set_kfserver_worker_to_1 branch October 20, 2020 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants