← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 994150] Re: IPv4 addresses stored as String(255) instead of INT

 

So we are currently doing shorter types for MySQL, and packed types for
PG. Given that we have to handle the IPv6 case, I'm going to consider
shorter strings "solved" for now.

** Changed in: nova
       Status: In Progress => Fix Committed

** Changed in: nova
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/994150

Title:
  IPv4 addresses stored as String(255) instead of INT

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  IPv4 addresses can be more efficiently stored in MySQL as an
  (UNSIGNED) INTEGER instead of as a UTF8 VARCHAR(255). The former
  requires only 4 bytes; the latter requires between 8 bytes (a.b.c.d)
  and 16 bytes (aaa.bbb.ccc.ddd) of storage, and up to 765 bytes of
  memory for certain operations where MySQL allocates memory based on
  the max row size (eg, sorts and in-memory temp tables).  Changing both
  `fixed_ips`.`address` and `floating_ips`.`address` to UINT looks to me
  like it would have a positive impact for deployments with very large
  numbers of IP addresses. There might be other columns that could
  benefit from this as well.

  I can't speak to the efficiency of other databases from experience,
  but I expect the performance difference would be similar.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/994150/+subscriptions