Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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)

output_migrate_trimmed.png (112.6 KB ) - added by Vikas 9 years ago.
Migrate cProfile + gprof2dot analysis (trimmed to include all method >=5% usage only)

Download all attachments as: .zip

Change History (5)

by Vikas, 9 years ago

Attachment: output_migrate_trimmed.png added

Migrate cProfile + gprof2dot analysis (trimmed to include all method >=5% usage only)

comment:1 by Vikas, 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 Aymeric Augustin, 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 Tim Graham, 9 years ago

Resolution: needsinfo
Status: newclosed

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!

comment:4 by Vikas, 9 years ago

@timgraham: My bad. Didn't know about that. Thanks!

Note: See TracTickets for help on using tickets.
Back to Top