[HELP]How to set up ircd and server to handle over 4K client

These are old archives. They are kept for historic purposes only.
Post Reply
ircman77
Posts: 6
Joined: Sat Jan 14, 2012 12:24 pm

[HELP]How to set up ircd and server to handle over 4K client

Post by ircman77 »

Hello people!

My problem is that at ~4K clients other users (php bot's ) are connecting very slow or not at all.My OS is atm FreeBSD 8.0-RELEASE.
Here are the RAM and CPU info's:

Code: Select all

bsd# sysctl -a | egrep -i 'hw.model|hw.ncpu|hw.physmem|hw.usermem'
hw.model: Intel(R) Xeon(R) CPU           E5520  @ 2.27GHz
hw.ncpu: 16
hw.physmem: 3466661888
hw.usermem: 3010748416
bsd#
Here is the ulimit -n output:

Code: Select all

# ulimit -n
11095
#
Is strange because when i setup the ircd i did ulimit -n and it was 11905.Now when i wrote this post i did again ulimit -n to paste it here and the ulimit was 512 so i had to do again ulimit -n 11095 to set it to 11095 but it does not remain 11095.It goest to 512.I also did sysctl kern.maxfiles and sysctl kern.maxfilesperproc and the output was:

Code: Select all

bsd# sysctl kern.maxfiles=12328
kern.maxfiles: 12328
sysctl: kern.maxfiles: Operation not permitted
bsd# sysctl kern.maxfilesperproc=11095
kern.maxfilesperproc: 11095
sysctl: kern.maxfilesperproc: Operation not permitted
bsd# whoami
root
bsd#
Anyway this is a new problem as the first time i managed to get ~4K clients on ircd.But it would be nice to solve this problem with ulimit too.So returning to the first problem (no more connections when ircd reach ~4K) i must say that also what is happening is abut 500-1000 clients from total of 4000 goes in ping timeout.Also /lusers i have 4127 unknown connection(s). 4127 + ~4000 connected and joined in channel = 8127. 8127 would be the right amount of users which
must get connected.
The bandwith of the server is: 808 kBps.According to http://www.vulnscan.org/faq#46 i think i have the right hardware for runing 10K users since syzop says you need 1GHz CPU and about 512Mb, and preferably 1Gb+ and the CPU of the ircd server is 2.27GHz and RAM is 3GB.

Please help me.
Thank's in advance!!!
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: [HELP]How to set up ircd and server to handle over 4K cl

Post by Stealth »

Personally I feel if you've got 4K clients that want to use your server you should probably consider getting another server. With 4K clients I'm sure it'd be quite easy to run ads on your server's website or get donations from your users to cover the cost of another server (one thing that I have seen work is selling vhosts on your network).

Other than that, if this server is managed by some company you may wish to talk to their support, or even contact the FreeBSD team to see why you're getting differing values.
ircman77
Posts: 6
Joined: Sat Jan 14, 2012 12:24 pm

Re: [HELP]How to set up ircd and server to handle over 4K cl

Post by ircman77 »

Why i should get another server? Isn't the hardware enough? Like i say i read that with 512Mb or preferably 1Gb+ RAM and minimum 1GHz CPU you can handle 10K. So my hardware is 2.27GHz and RAM is 3GB.It's clearly that is way out over what i read you must have.The number of cpu's is also 16.Isn't this enough?
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: [HELP]How to set up ircd and server to handle over 4K cl

Post by Stealth »

Even if you had the most powerful server known to man, I'd still recommend multiple servers for a large network. Why? Because having 1 server creates 1 very large point of failure for your network. You will have no where for your users to go if your server does down for any reason, needs upgrades that require a restart, the Internet has bad routes, your hosting provider goes out of business without warning, you get hacked, you get DDoS'd, the list can go on and these examples are very real.

There is no such thing as 100% uptime and 100% availability. Take a look at large corporations like Google, Facebook, Research in Motion (the blackberry people), even banks. They ALL have had downtime and they even have multiple servers and high redundancy to prevent such things.
ircman77
Posts: 6
Joined: Sat Jan 14, 2012 12:24 pm

Re: [HELP]How to set up ircd and server to handle over 4K cl

Post by ircman77 »

So you advise me to link multiple servers.Then, if i have a domain lets say irc.tld , i link let's say 3 servers and i want users to use at connect /server irc.tld: , what i must do in order to split the total amount of users connecting to hostname irc.tld on 3 servers? Maybe through some redirect from the main hub irc.tld to other two servers? Keep in mind that i only use for connect the hostname irc.tld.I dont report to users all three ip's of my servers.Just one,the main hub.If the redirect option is what i need can you guide me to setup such thing?
Thank's for reply!
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: [HELP]How to set up ircd and server to handle over 4K cl

Post by Stealth »

Use DNS A records. You can specify multiple DNS A records with the same name and different IPs, and the DNS server will give the clients a random IP to connect to. For more information, read about DNS "Round Robin".
ircman77
Posts: 6
Joined: Sat Jan 14, 2012 12:24 pm

Re: [HELP]How to set up ircd and server to handle over 4K cl

Post by ircman77 »

Okay i read about dns round robin, i setup the A records , i linked the servers.Now a problem would be: each server has maxperip set to 1. but i have 4 servers linked and 1+1+1+1 = 4 maxperip.Like i can connect from same ip four times not just 1 time as i wish to.How can i solve this problem.
Thank's in advance!
ircman77
Posts: 6
Joined: Sat Jan 14, 2012 12:24 pm

Re: [HELP]How to set up ircd and server to handle over 4K cl

Post by ircman77 »

It seems that i'm getting the same problem at about 4K after linking 4 servers.Some amount of users like 500-1000 goes in ping timeout / broken pipe even if the total of 4000 are splitted on four servers.
Anyone can help?
katsklaw
Posts: 1124
Joined: Sun Apr 18, 2004 5:06 pm
Contact:

Re: [HELP]How to set up ircd and server to handle over 4K cl

Post by katsklaw »

ircman77 wrote:Okay i read about dns round robin, i setup the A records , i linked the servers.Now a problem would be: each server has maxperip set to 1. but i have 4 servers linked and 1+1+1+1 = 4 maxperip.Like i can connect from same ip four times not just 1 time as i wish to.How can i solve this problem.
Thank's in advance!
Limiting to 1 is not a good idea as IRC users can be disconnected, usually involuntarily, and a "ghost" remain on IRC. Said ghost can remain for extended periods of time especially if the user in question cannot connect to have services kill their ghost. It's standard practice to allow users a few extra connections for such events.

As far as global limits, most services packages has session limiting to control global connections.
ircman77
Posts: 6
Joined: Sat Jan 14, 2012 12:24 pm

Re: [HELP]How to set up ircd and server to handle over 4K cl

Post by ircman77 »

And what about ping timeout / broken pipe? I've linked 4 servers and they are splitted in 4. I managed to get 5.8K but in next 10 minutes i had 4.2K the difference going in ping timeout / broken pipe.
Post Reply