From fapg at eurotux.com Wed Jul 29 13:40:47 2009 From: fapg at eurotux.com (Fernando A. P. Gomes) Date: Wed, 29 Jul 2009 14:40:47 +0100 Subject: weight problem Message-ID: <200907291440.47986.fapg@eurotux.com> Hi, I've configured lvs to give diferent weight to my virtual servers: server s1 { address = 172.16.42.15 active = 1 weight = 1000 } server s2 { address = 172.16.42.124 active = 1 weight = 1 } However, the the ipvs list of connections give me this: TCP xxx.xxx.xxx.xxx:80 rr persistent 2700 -> 172.16.42.124:80 Masq 1 24 2674 -> 172.16.41.15:80 Masq 1000 400 2159 And an access count with the apache logs gives me this: s1 (172.16.41.15): grep "29/Jul/2009:14:23" access_log.2009-07-29 | wc -l 1054 s2 (172.16.42.124): grep "29/Jul/2009:14:23" access_log.2009-07-29 | wc -l 1380 I've more accesses to s2, that have a lower weight than s1, and the ipvs connection list should be 1000 to 1. Can anybody comment? Regards, Fernando Gomes -- Fernando Alexandre Peixoto Gomes Eurotux Inform?tica, S.A. [http://eurotux.com] Rua Rosalvo de Almeida, 5. 4710-429 BRAGA PORTUGAL Tel: (+351) 253 257395 - Fax: (+351) 253 257396 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: From mike at ubxess.com Wed Jul 29 13:46:26 2009 From: mike at ubxess.com (Mike Kemelmakher) Date: Wed, 29 Jul 2009 16:46:26 +0300 Subject: weight problem In-Reply-To: <200907291440.47986.fapg@eurotux.com> References: <200907291440.47986.fapg@eurotux.com> Message-ID: <9c387a370907290646j1c9c6024pda8d56473dd61d11@mail.gmail.com> Hi, Thats because you choose "rr" scheduling algorithm - which is not aware of weight parameter try to change it to wlc or wrr and see what you get -Mike On Wed, Jul 29, 2009 at 4:40 PM, Fernando A. P. Gomes wrote: > Hi, > > I've configured lvs to give diferent weight to my virtual servers: > > server s1 { > address = 172.16.42.15 > active = 1 > weight = 1000 > } > server s2 { > address = 172.16.42.124 > active = 1 > weight = 1 > } > > However, the the ipvs list of connections give me this: > > TCP xxx.xxx.xxx.xxx:80 rr persistent 2700 > -> 172.16.42.124:80 Masq 1 24 2674 > -> 172.16.41.15:80 Masq 1000 400 2159 > > And an access count with the apache logs gives me this: > > s1 (172.16.41.15): > grep "29/Jul/2009:14:23" access_log.2009-07-29 | wc -l > 1054 > s2 (172.16.42.124): > grep "29/Jul/2009:14:23" access_log.2009-07-29 | wc -l > 1380 > > I've more accesses to s2, that have a lower weight than s1, and the ipvs > connection list should be 1000 to 1. > > Can anybody comment? > > Regards, > Fernando Gomes > -- > Fernando Alexandre Peixoto Gomes > Eurotux Inform?tica, S.A. [http://eurotux.com] > Rua Rosalvo de Almeida, 5. 4710-429 BRAGA PORTUGAL > Tel: (+351) 253 257395 - Fax: (+351) 253 257396 > > > _______________________________________________ > Piranha-list mailing list > Piranha-list at redhat.com > https://www.redhat.com/mailman/listinfo/piranha-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fapg at eurotux.com Wed Jul 29 14:26:42 2009 From: fapg at eurotux.com (Fernando A. P. Gomes) Date: Wed, 29 Jul 2009 15:26:42 +0100 Subject: weight problem In-Reply-To: <9c387a370907290646j1c9c6024pda8d56473dd61d11@mail.gmail.com> References: <200907291440.47986.fapg@eurotux.com> <9c387a370907290646j1c9c6024pda8d56473dd61d11@mail.gmail.com> Message-ID: <200907291526.43244.fapg@eurotux.com> Hi, The beahivor improveed, but isn't the expected (I changed the algorithm and raised the weight): TCP xxx.xxx.xxx.xxx:80 wrr persistent 2700 -> 172.16.42.124:80 Masq 1 17 951 -> 172.16.41.15:80 Masq 5000 221 3215 grep "29/Jul/2009:15:23" access_log.2009-07-29 | grep -v "172.16.42.15" |wc -l 408 grep "29/Jul/2009:15:23" access_log.2009-07-29 | wc -l 1677 Cumprimentos, Fernando Gomes On Wednesday 29 July 2009, Mike Kemelmakher wrote: > Hi, > > Thats because you choose "rr" scheduling algorithm - which is not aware > of weight parameter > try to change it to wlc or wrr and see what you get > > -Mike > > On Wed, Jul 29, 2009 at 4:40 PM, Fernando A. P. Gomes wrote: > > Hi, > > > > I've configured lvs to give diferent weight to my virtual servers: > > > > server s1 { > > address = 172.16.42.15 > > active = 1 > > weight = 1000 > > } > > server s2 { > > address = 172.16.42.124 > > active = 1 > > weight = 1 > > } > > > > However, the the ipvs list of connections give me this: > > > > TCP xxx.xxx.xxx.xxx:80 rr persistent 2700 > > -> 172.16.42.124:80 Masq 1 24 2674 > > -> 172.16.41.15:80 Masq 1000 400 2159 > > > > And an access count with the apache logs gives me this: > > > > s1 (172.16.41.15): > > grep "29/Jul/2009:14:23" access_log.2009-07-29 | wc -l > > 1054 > > s2 (172.16.42.124): > > grep "29/Jul/2009:14:23" access_log.2009-07-29 | wc -l > > 1380 > > > > I've more accesses to s2, that have a lower weight than s1, and the ipvs > > connection list should be 1000 to 1. > > > > Can anybody comment? > > > > Regards, > > Fernando Gomes > > -- > > Fernando Alexandre Peixoto Gomes > > Eurotux Inform?tica, S.A. [http://eurotux.com] > > Rua Rosalvo de Almeida, 5. 4710-429 BRAGA PORTUGAL > > Tel: (+351) 253 257395 - Fax: (+351) 253 257396 > > > > > > _______________________________________________ > > Piranha-list mailing list > > Piranha-list at redhat.com > > https://www.redhat.com/mailman/listinfo/piranha-list -- Fernando Alexandre Peixoto Gomes Eurotux Inform?tica, S.A. [http://eurotux.com] Rua Rosalvo de Almeida, 5. 4710-429 BRAGA PORTUGAL Tel: (+351) 253 257395 - Fax: (+351) 253 257396 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: From mike at ubxess.com Wed Jul 29 14:46:30 2009 From: mike at ubxess.com (Mike Kemelmakher) Date: Wed, 29 Jul 2009 17:46:30 +0300 Subject: weight problem In-Reply-To: <200907291526.43244.fapg@eurotux.com> References: <200907291440.47986.fapg@eurotux.com> <9c387a370907290646j1c9c6024pda8d56473dd61d11@mail.gmail.com> <200907291526.43244.fapg@eurotux.com> Message-ID: <9c387a370907290746i674ee37aha098ceb70a99ded5@mail.gmail.com> 1. you should try wlc ( weighted least connection ) - probably in your case it should perform better 2. why do you use "persistent" parameter ? is there any special purpose for that ? if not - you should remove it. and one more thing - use ipvsadm to monitor your connections - you can get the LVS connection table using ipvsadm as well cheers, -Mike On Wed, Jul 29, 2009 at 5:26 PM, Fernando A. P. Gomes wrote: > Hi, > > The beahivor improveed, but isn't the expected (I changed the algorithm and > raised the weight): > > TCP xxx.xxx.xxx.xxx:80 wrr persistent 2700 > -> 172.16.42.124:80 Masq 1 17 951 > -> 172.16.41.15:80 Masq 5000 221 3215 > > grep "29/Jul/2009:15:23" access_log.2009-07-29 | grep -v "172.16.42.15" |wc > -l > 408 > > grep "29/Jul/2009:15:23" access_log.2009-07-29 | wc -l > 1677 > > Cumprimentos, > Fernando Gomes > > On Wednesday 29 July 2009, Mike Kemelmakher wrote: > > Hi, > > > > Thats because you choose "rr" scheduling algorithm - which is not > aware > > of weight parameter > > try to change it to wlc or wrr and see what you get > > > > -Mike > > > > On Wed, Jul 29, 2009 at 4:40 PM, Fernando A. P. Gomes > wrote: > > > Hi, > > > > > > I've configured lvs to give diferent weight to my virtual servers: > > > > > > server s1 { > > > address = 172.16.42.15 > > > active = 1 > > > weight = 1000 > > > } > > > server s2 { > > > address = 172.16.42.124 > > > active = 1 > > > weight = 1 > > > } > > > > > > However, the the ipvs list of connections give me this: > > > > > > TCP xxx.xxx.xxx.xxx:80 rr persistent 2700 > > > -> 172.16.42.124:80 Masq 1 24 2674 > > > -> 172.16.41.15:80 Masq 1000 400 2159 > > > > > > And an access count with the apache logs gives me this: > > > > > > s1 (172.16.41.15): > > > grep "29/Jul/2009:14:23" access_log.2009-07-29 | wc -l > > > 1054 > > > s2 (172.16.42.124): > > > grep "29/Jul/2009:14:23" access_log.2009-07-29 | wc -l > > > 1380 > > > > > > I've more accesses to s2, that have a lower weight than s1, and the > ipvs > > > connection list should be 1000 to 1. > > > > > > Can anybody comment? > > > > > > Regards, > > > Fernando Gomes > > > -- > > > Fernando Alexandre Peixoto Gomes > > > Eurotux Inform?tica, S.A. [http://eurotux.com] > > > Rua Rosalvo de Almeida, 5. 4710-429 BRAGA PORTUGAL > > > Tel: (+351) 253 257395 - Fax: (+351) 253 257396 > > > > > > > > > _______________________________________________ > > > Piranha-list mailing list > > > Piranha-list at redhat.com > > > https://www.redhat.com/mailman/listinfo/piranha-list > -- > Fernando Alexandre Peixoto Gomes > Eurotux Inform?tica, S.A. [http://eurotux.com] > Rua Rosalvo de Almeida, 5. 4710-429 BRAGA PORTUGAL > Tel: (+351) 253 257395 - Fax: (+351) 253 257396 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fapg at eurotux.com Wed Jul 29 15:33:48 2009 From: fapg at eurotux.com (Fernando A. P. Gomes) Date: Wed, 29 Jul 2009 16:33:48 +0100 Subject: weight problem In-Reply-To: <9c387a370907290746i674ee37aha098ceb70a99ded5@mail.gmail.com> References: <200907291440.47986.fapg@eurotux.com> <200907291526.43244.fapg@eurotux.com> <9c387a370907290746i674ee37aha098ceb70a99ded5@mail.gmail.com> Message-ID: <200907291634.01442.fapg@eurotux.com> Hi, > 1. you should try wlc ( weighted least connection ) - probably in your > case it should perform better I've try'ed wlc, and it's the same behavior. > 2. why do you use "persistent" parameter ? is there any special purpose > for that ? if not - you should remove it. I've sessions, but thi problem must be here. I will try to remove this parameter. > and one more thing - use ipvsadm to monitor your connections - you can > get the LVS connection table using ipvsadm as well Yes, I use ipvsadm to monitor the connections. Thanks a lot, Fernando Gomes > cheers, > -Mike > > On Wed, Jul 29, 2009 at 5:26 PM, Fernando A. P. Gomes wrote: > > Hi, > > > > The beahivor improveed, but isn't the expected (I changed the algorithm > > and raised the weight): > > > > TCP xxx.xxx.xxx.xxx:80 wrr persistent 2700 > > -> 172.16.42.124:80 Masq 1 17 951 > > -> 172.16.41.15:80 Masq 5000 221 3215 > > > > grep "29/Jul/2009:15:23" access_log.2009-07-29 | grep -v "172.16.42.15" > > |wc -l > > 408 > > > > grep "29/Jul/2009:15:23" access_log.2009-07-29 | wc -l > > 1677 > > > > Cumprimentos, > > Fernando Gomes > > > > On Wednesday 29 July 2009, Mike Kemelmakher wrote: > > > Hi, > > > > > > Thats because you choose "rr" scheduling algorithm - which is not > > > > aware > > > > > of weight parameter > > > try to change it to wlc or wrr and see what you get > > > > > > -Mike > > > > > > On Wed, Jul 29, 2009 at 4:40 PM, Fernando A. P. Gomes > > > > wrote: > > > > Hi, > > > > > > > > I've configured lvs to give diferent weight to my virtual servers: > > > > > > > > server s1 { > > > > address = 172.16.42.15 > > > > active = 1 > > > > weight = 1000 > > > > } > > > > server s2 { > > > > address = 172.16.42.124 > > > > active = 1 > > > > weight = 1 > > > > } > > > > > > > > However, the the ipvs list of connections give me this: > > > > > > > > TCP xxx.xxx.xxx.xxx:80 rr persistent 2700 > > > > -> 172.16.42.124:80 Masq 1 24 2674 > > > > -> 172.16.41.15:80 Masq 1000 400 2159 > > > > > > > > And an access count with the apache logs gives me this: > > > > > > > > s1 (172.16.41.15): > > > > grep "29/Jul/2009:14:23" access_log.2009-07-29 | wc -l > > > > 1054 > > > > s2 (172.16.42.124): > > > > grep "29/Jul/2009:14:23" access_log.2009-07-29 | wc -l > > > > 1380 > > > > > > > > I've more accesses to s2, that have a lower weight than s1, and the > > > > ipvs > > > > > > connection list should be 1000 to 1. > > > > > > > > Can anybody comment? > > > > > > > > Regards, > > > > Fernando Gomes > > > > -- > > > > Fernando Alexandre Peixoto Gomes > > > > Eurotux Inform?tica, S.A. [http://eurotux.com] > > > > Rua Rosalvo de Almeida, 5. 4710-429 BRAGA PORTUGAL > > > > Tel: (+351) 253 257395 - Fax: (+351) 253 257396 > > > > > > > > > > > > _______________________________________________ > > > > Piranha-list mailing list > > > > Piranha-list at redhat.com > > > > https://www.redhat.com/mailman/listinfo/piranha-list > > > > -- > > Fernando Alexandre Peixoto Gomes > > Eurotux Inform?tica, S.A. [http://eurotux.com] > > Rua Rosalvo de Almeida, 5. 4710-429 BRAGA PORTUGAL > > Tel: (+351) 253 257395 - Fax: (+351) 253 257396 -- Fernando Alexandre Peixoto Gomes Microsoft Certified Systems Engineer Eurotux Inform?tica, S.A. [http://eurotux.com] Rua Rosalvo de Almeida, 5. 4710-429 BRAGA PORTUGAL Tel: (+351) 253 257395 - Fax: (+351) 253 257396 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: