#26420 closed Uncategorized (needsinfo)
CPU Usage goes extremely high with migrate management command
Reported by: | Vikas | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 1.9 |
Severity: | Normal | Keywords: | migrate |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
CPU usage goes as high 85-90% when using migrate command
Configurations/Package versions
- 2.7 GHz Intel Core i5
- 8GB 1867 MHz DDR3 RAM
- Django 1.8.3
It this normal?
Ran CProfile along with gprofdot to analyze what method is taking longer. Attaching the same below.
Attachments (1)
Change History (5)
by , 9 years ago
Attachment: | output_migrate_trimmed.png added |
---|
comment:1 by , 9 years ago
Also I have checked my system process activity monitor. python takes up upto 98% cpu usage and so CPU usage isn't going high due to any other external service but is tied to migrate management command.
comment:2 by , 9 years ago
Yes, makemigrations and migrate are known to be CPU bound, due to the complexity of the migration graph. Usually they're reported for being slow; the root cause is the same.
comment:3 by , 9 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
There's at least one ticket open with some concrete items to investigate (#26407). I think that's better than leaving a more general ticket like this open. If you have some specific ideas or would like to provide a patch, feel free to reopen. Thanks!
Migrate cProfile + gprof2dot analysis (trimmed to include all method >=5% usage only)