biddyweb / ovz-web-panel

Automatically exported from code.google.com/p/ovz-web-panel
Other
0 stars 0 forks source link

Webpanel slows down if large ip pools are created #286

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce:
1. Create large IP Pool with about ~50000 Adresses
2. Create VE dialog is loading now very slow, and ip adress search is very slow 
too.
3.

Actual result:
application slows down
Expected result:
no slowdown of application
Version of the product:
2.0
Server OS:
Debian 5.0
Browser:
Firefox 4.0

In the IP address search (in create ve dialog) you should try to limit ip 
addresses which are shown to a lower value. Maybe the first 256 addresses or 
one /24 subnet. 

one approach is to store every single usable address in a single database row. 
Then you can easily limit the output via a mysql limit query. 
In this case it would be better to store the ip address not in the "ip address 
form", but rather in INT form. Mysql provides the functions INET_NTOA and 
INET_ATON for converting ips for and backwards. 

For example you can use a database scheme like this:
CREATE TABLE `iptest`.`ip` (
`ip` INT NOT NULL ,
`server` INT NULL ,
`usage` SET( 'gateway', 'free', 'broadcast', 'vrrp', 'reserved', 'used', 
'additional' ) NOT NULL ,
INDEX ( `ip` )
) ENGINE = MYISAM ;

If you want get free ips in a range you can simply use the following query:
SELECT ip FROM ip WHERE (ip BETWEEN INET_ATON('10.0.0.0') AND 
INET_ATON('10.0.0.50')) AND usage = 'free' AND server IS NULL ORDER BY IP ASC 
LIMIT 100;

Regards
Alex

Original issue reported on code.google.com by bufok...@web.de on 27 Apr 2011 at 6:00

GoogleCodeExporter commented 9 years ago

Original comment by sibprogrammer on 28 Apr 2011 at 1:17

GoogleCodeExporter commented 9 years ago

Original comment by sibprogrammer on 1 May 2012 at 10:06

GoogleCodeExporter commented 9 years ago
I added ipv6 pool:
2a01:04f8:0191:3161:0000:0000:0000:0000-
2a01:04f8:0191:3161:ffff:ffff:ffff:ffff

total IP addresses  18446744073709551616

and now can't open ip addresses tab, it infinity loading.

How can i delete this pool manually, without web panel?

Original comment by zorg.r...@gmail.com on 23 Apr 2015 at 8:50