Server :: Increase Multi Threaded Server Proficiency?

Apr 29, 2011

I am implementing a proxy server in c++. It is multithreaded(posix).Used CPU : Xeon(8core) Thread number : 8 One main thread, and other 7 thread created by the main thread. The main thread always listen to ports. When the main thread gets a client data it push the request in a queue[there are one queue(total 7) for each thread] based on ip and then give a signal to the appropriate thread. Then that thread gets the request from it's queue and process data and then forward the data to a appropriate destination.

There is another important thing, I assign each thread excluding the main thread to individual core by using affinity.The main thread listens to 5 ports. Test environment: We run the server. The client sends audio data at a particular rate.

1. The main thread CPU usage gets overloaded (above 80%) after a certain load from client.

2. Other cores remain about 0-10%.

The thing is that we want to distribute the load among all the cores equally by multithreading. But how can we do this ? Can the listening task of ports also be distributed ? I need an efficient algorithm for load balancing among threads. The data sent and receive rate of server is about 8.5MB/s. How can we improve this ? we are using gigabit LAN card. When the server only receive data from client it can receive data above 80MB/s. But when it both receives and sends data simultaneously it only manage upto 8.5MB/s.

View 1 Replies


ADVERTISEMENT

Programming :: Simple Multi-threaded/forked TCP Listener/server?

Aug 12, 2010

For quite some time now, I've been trying to implement a multi-threaded or forked TCP server to perform the following action:1) Listen for new connections on all ip addresses on a specific port.2) Wait for a new connection to arrive3) When a new connection coms in, fork or thread to free up the listening process so it can go back to #2.When handling a client after it's been forked/threaded4) Get the connected client's ip address.5) Perform some in-house processing;6) Read the data sent from the client (checking for http connections)7) Perform some more processing;8) Write some data back to the client based on the above processing9) Close the socket/thread/forkI've tried implementing an solution similar to the multi-threaded example show here http://perl.active-venture.com/pod/p...-sockets.html; as well as looking at the CPAN solutions Net:aemon and POE::Component::Server::TCP but these don't seem to give me the information needed.The active-venture solution provides me with what I need, but randomly exits without reason/error and when attempting to change the 'for' loop to a 'while' loop, it keeps throwing up different errors.

View 2 Replies View Related

Programming :: VTALRM In Multi-threaded Programs?

Apr 20, 2011

I ran into an inconsistency in handling timers (VTALRM) between AMD and intel platforms with threads. My understanding was that the timers are per process. I discovered I must call setitimer in the thread on intel though. AMD allows me to make the setitimer call once in the main thread as expected. The code below demonstrates the issue. I must add the code in the INTEL define for it to work properly on intel cpu's. Am I missing something dumb??

[Code]...

View 4 Replies View Related

General :: Regarding Coding Multi Threaded Applications In C/C++?

Jun 15, 2010

writing multi threaded programs in C,C++.

View 3 Replies View Related

Ubuntu Servers :: Run High-priority Multi-threaded Processes In The Background?

Apr 7, 2011

Using Ubuntu server 10.04.2 64-bit all up to date.

I am running multi-threaded processes. These use OpenMP in my own code and the multi-threaded ACML maths library. When run in the foreground, everything is fine i.e. if I have set

export OMP_NUM_THREADS=8

then when I start all 8 cores are in use and things whizz along. However, when running overnight and logged out using e.g. 'at now + 1 minute' then the command, I am only getting about 130% CPU and it slows down accordingly. I have tried renice'ing and calling from within a bash script in case sh is doing something odd but nothing seems to solve it. I am sure that in the recent past this wasn't the case.

The libraries being used are shared versions in case that might have any bearing.

View 1 Replies View Related

Programming :: Add Local Sockets In Multi-threaded Application In Order To Exchange Data Between Threads?

Jul 24, 2010

I'm trying to add local sockets in my multi-threaded application in order to exchange data between threads. The only problem I got is that most of the information available on the net is related to internet oriented socket programming whileI want to perform local connections. got a thread that does the sniffing via libpcap. And I would like that thread to send each captured packet to a second thread that will analyse the packetof the thread implementations is written in separate .h file.Or maybe there is a more effective method of exchanging data between threads

View 14 Replies View Related

Debian Configuration :: Install A Multi-core System And Configure It To Run Several VMs, One Each For A Firewall, A Caching Proxy Server, A Mail Server, A Web Server?

Jan 25, 2011

I will be relocating to a permanent residence sometime in the next year or two. I've recently begun thinking about the best way to implement a home-based network. It occurred to me that the most elegant solution might be the use of VM technology to eliminate as much hardware and wiring as possible.My thinking is this: Install a multi-core system and configure it to run several VMs, one each for a firewall, a caching proxy server, a mail server, a web server. Additionally, I would like to run 2-4 VMs as remote (RDP)workstations, using diskless workstations to boot the VMs over powerline ethernet.The latest powerline technology (available later this year) will allow multiple devices on a residential circuit operating at near gigabit speed, just like legacy wired networks.

In theory, the above would allow me to consolidate everything but the disklessworkstations on a single server and eliminate all wired (and wireless) connections except the broadband connection to the Internet and the cabling to the nearest power outlets. It appears technically possible, but I'm not sure about the various virtual connections among VMs. In theory, each VM should be able to communicate with the other as if it was on the same network via the server data bus, but what about setting up firewall zones? Any internal I/O bandwidth bottlenecks? Any other potential "gotchas", caveats, issues? (Other than the obvious requirement of having enough CPU and RAM).Any thoughts or observations welcome, especially if they are from real world experience in a VM environment. BTW--in case you're wondering why I'm posting here, it's because I run Debian on all my workstations/servers (running VirtualBox as a VM for Windows XP on one workstation).

View 14 Replies View Related

CentOS 5 Server :: Increase The Size Of A Server Partition As /dev/loop0?

Jul 16, 2011

How can I increase the size of a server partition as /dev/loop0

Disk informationDeviceMount pointUsage
/dev/loop0/var/tmp2% (11,070 of 495,844)
/dev/sda1/46% (100,819,056 of 233,872,292)
/usr/tmpDSK/tmp3% (11,070 of 495,844)

I use

WHM 11.30.1 (build 4)
CENTOS 5.6 i686 standard on ds-59085

View 1 Replies View Related

Server :: Abrupt Increase In Server Load Upto 300?

Sep 19, 2010

I run a server with nginx at the front and apache at the background. Nginx serves as a reverse proxy in here. As there were lots of DOS attacks, I have implemented Deflate-DDOS, APF and Nginx anti-ddos features and the server runs without a problem. Once every month, the load on server increases upto 300 and I receive an email like this :

Subject : Cron <root@server> [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm

Content :

find: `/var/lib/php5/sess_0ca40520ac8ecb66090746f90da17516': No such file or directory
find: `/var/lib/php5/sess_3839b0cbf042934183d56ff682c948e0': No such file or directory
find: `/var/lib/php5/sess_dec1ed8ea1f62caf7a42a29b9f82c506': No such file or directory

[code]....

There's more that 100,000 ( I suppose ) lines on this email. I have no idea what the problem is. It seems there's something with the session, but I really don't know what it is.

View 1 Replies View Related

Server :: Increase Max Connections For Dedicated Server?

Jun 18, 2010

Can anyone walk me through the process of increasing my max connection on my linux server?Over the last few weeks I have been getting errors saying I have to many connections.I think the default is 100 and I would like to maybe increase it to 150 or 200I know I cannot go to high because I will then be using to much of my memory or maybe CPU

View 8 Replies View Related

Server :: How Is Multi Server Configured Without /home_dir

Apr 25, 2010

Configuring PIII600e, Slackware 12.2, with 2hdd (160Gb each) for Virtual Web,MySQL,PHP,DDNS,SSHd,Mail,ProFTP servers. I have 3 other PCs w/Slackware12.2, 1 XPwindows, and mac laptop on the LAN. Will be putting webpages together on slackware 12.2, XP, and Mac. *Read some where I don't need /home directory on server box, just use /home directory from other slackware box's /home directory- Since only user on server will be Administrator - how does this work? Will i work with Dupral? Does an Admin directory take the place of home? explain the advantages of configuring server box without /home directory and how its done?

Proposed Partitioning Option:

/root 15GB
/swap 2GB
/usr 60GB

[code]....

View 4 Replies View Related

Server :: How To Increase Var Directory

Nov 17, 2010

my /var dir partation /dev/sda7 of 965M, how to increse this size using free available disk space?

[root@SANJAY-CMS 500]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 4.8G 3.1G 1.5G 69% /

[code]....

View 1 Replies View Related

Server :: Possible To Increase The Size Of The / Partition?

Dec 14, 2009

Is it possible to increase the size of the / partition?

View 5 Replies View Related

Server :: Multi Wan Loadbalancing In Squid?

Sep 24, 2010

i am using squid on fedora 12. I have two wan DSL links. is it possible that two dsl connections can be used on linux for loadbalancing.One requsest goest with first dsl ethernet and other request go to other dsl ethernet Like RoundRobin.

View 1 Replies View Related

Ubuntu Installation :: Using Multiple HD's To Increase Server Speed?

Jan 21, 2010

I am curious if it is possible to use multiple hard drives to increase server speed. I know I could run stripped drives or RAID0, but was wondering if there is any other way to do it within Linux. My default 9.10 Server install has 3 partitions as a default. Would splitting these on three drives make it any faster?

View 3 Replies View Related

Server :: Increase Number Of Url_rewriter Processes In Squid?

Feb 28, 2009

Code...

I don't know how to increase the number of url_rewriter processes.

View 2 Replies View Related

Server :: Increase The Root Size Partition In Fedora?

Dec 28, 2010

fedora 12.i have one partition which is mounted on a rootfiles folder having space of 700gb which is located on a /directory.but when im adding data on rootfiles my /root directory space is also getting increased.so could any one telme how to increase the size of root partition.i want to resize my rootfiles folder to 600db and want to add 100gb to my / directory.how can i do this plz helpme this is important 4 me.first i will free 100gb then i will add 100gb to root directory.but i dont want to loose any data on rootfiles folder.

View 3 Replies View Related

Server :: Increase The Size In Software RAID-1 Configuration

Oct 26, 2010

I have created a filesystem /data using software RAID-1 concept using two disks.

/dev/sdb - 50 GB
/dev/sdc - 50 GB

now i have to increase the /data to 100GB by adding two more disk.

/dev/sdd - 50GB
/dev/sde - 50GB

is this possible, if yes

how exactly i can increase the existing RAID-1 array from 50GB to 100GB.

View 1 Replies View Related

CentOS 5 Server :: How To Increase Boot Partition Size

Feb 24, 2010

my boot partition used 100% how i can increase partition size

View 2 Replies View Related

General :: Any Multi Protocol Proxy Server Software

Aug 29, 2010

-my vpn connection constantly gets disconnected in linux mint but not in my windows 7 or mac os 10.5.8 and there are no retry options in here in case the connection drops?
-is there any multi protocol proxy server software available for linux (socks,http,https)? preferably free.
my google search returned that Squid is the most popular proxy software for linux but its either freakishly hard to install and use or there is just no simple beginner guide for it.
-what's the hotkey to switch between workspaces?

View 4 Replies View Related

Server :: Setting Up A Multi-level Multiple Fuctions?

Dec 4, 2010

A friend of mine is starting a school this school has computers. I'm assuming windows but that's not that point at the moment. He asked me about setting a main unit that held the kids info and their work complete on the computer. Effectivley what I am asking is how do I set up a server to allow many multiple (at least 50 user at a time) each with their own folder as their home (or desktop I guess is a better word). He also wants a person to be able to add themselves as an account similar to that of signing up for something (ie facebook twitter you know). Oh and ( I almost forgot the most important) how to setup the server to allow the other computer to boot to it via the network...

View 3 Replies View Related

Networking :: Increase Storage Space Of Server With NAS/DAS Device Via Gigabit Ethernet?

Feb 8, 2010

Cost effective (the people want cheap) solution to increase server storage space with as little impact on throughput (what I want) as possible. I have a server that sends instructions to 20 clients to perform certain tasks. The clients send gigs of data back to the server for storage.

BACKGROUND INFORMATION
Network: Gigabit Ethernet
Clients: (20) HP, Solaris, Linux
Linux Server: Dell R805 PowerEdge (QUAD Core Athlons 16 gigs of ram, 4 gigabit ports.

Selected directories are mounted (NFS) by clients. One directory to be mounted by the clients contains executable files. Mount commands are sent from the server (rsh) to the clients. Yes I know (ssh) but this is how the software was originally written so let's go with it.

The clients then receive commands to execute the binaries contained within the mounted directory. The binaries basically create an image of the clients filesystem including special applications. The client then sends the files and directories to the server which stores this �image�. This process can be reversed to restore a client to the initial baseline image.

In a nut shell, 20 clients are sending gigs of data to the server for storage. I need to attach a NAS (gigabit) to extend the storage capability of the server. The server would mount (NFS) to the hard drives on the NAS. The NAS, configured as a �direct attached storage� device (DAS), means the storage device is connected directly to the server and not the network (which makes it a DAS). This would provide direct storage expansion for the server. However, this configuration cannot be a bottleneck that significantly hinders performance.

Clients <---data---->Server<----storage---->DAS/NAS

1) Will a low end NAS (gigabit port) work? (NetGear 1TB ReadyNAS Duo, RND2110-100NAS) or something with a higher rated throughput (QNAP TS-239 Pro II)

2) Low end won't work, go with �?

3) Does the processor on the NAS play any role that would determine the performance of this configuration given that the server would mount directly to a directory on this device (DAS/NAS)?

View 7 Replies View Related

OpenSUSE Network :: Using Server For Load Balancing Multi Internet?

Jan 5, 2010

I have OpenSuse 11.1 installed in a system as server (without graphics). We have 3 NICs, 2 of them connected to 2 different ISPs through gateways, as follows:

IPs for NICs: IP1=192.168.5.2/24; IP2=192.168.6.2/24 dev=eth2
Gateways: GW1=192.168.5.10; GW2=192.168.6.10 dev=eth3
Third NIC connected into the internal network with and IP=192.168.11.2/24 dev=eth0

We added ip routes and rules as follows (used tables created with vim in the rt_table file with numbers 20 & 30):

ip route add NET1 dev DEV1 src IP1 table TB1
ip route add default via GW1 table TB1
ip route add NET2 dev DEV2 src IP2 table TB2

[code]....

ip route add default scope global nexthop via GW1 dev DEV1 weight WG1 nexthop via GW2 dev DEV2 weight WG2 from the server I could ping Yahoo! and ping any PC connected in the internal network (192.168.11.xxx). Fro PCs I could ping all the IPs of the server but not the GWs neither any web site, I couldn't surf either.

View 7 Replies View Related

Ubuntu Installation :: Multi Distros To Choose Best For Server: What Partitions

Jan 22, 2011

i decided to build a home server on an AMD64 (buyed some years ago) for file storage, printer sharing and something else... I've searched a lot for "the best distros for server" and discarding extreme solution (like command line only) what remains is: Ubuntu, Fedora and Debian

Now the problem: how to install more than one distros on the same hdd? what i know is that i need a bootloader (grub/lilo) and partitions for boot,swap, and remaining space will be split for the distro itself.

I think is a good idea to have a partition only for files (/data) that all distros can access, but for sure i'd like to have one /root and one /home partitions each distro!

I can't understand if the correct way is first of all to install a distro (let's say ubuntu), then set up everything such as partitions and bootloader and then install other distros. I'd like to know if it is possible to manage dinamycally the space reserved for distros, so i'll be able to install 2,3,4,5...distros with no problems.

View 2 Replies View Related

Ubuntu Servers :: Create A Multi-user LAMP Server?

May 25, 2011

I am looking to create a multi-user LAMP server. For example the domain name behind my curent server is [URL] I would like user1 to have [URL] and user2 [URL]

View 9 Replies View Related

Slackware :: Multi-lib From AlienBOB 13.1 Can't Compile VMware Server 2.0.2 B-203138

Jul 8, 2010

Slackware64 multi-lib from AlienBOB 13.1 can't compile VMware Server 2.0.2 build-203138

1. It does run wine 32 bit version ( a package called "64" bit, but there ain't no 64bit wine, right?)

2. It runs 32 bit programs in that wine.

3. It is vanilla 2.6.33.4 kernel 64bit so far.

Shall I go for VirtualBox or can I get VMWare to work any soon? I already did the VMware-server-2.0.2-203138-update-2.patch and got a bit further, but the build of the vmmon just "goes to pieces"?

Code:

make: Entering directory `/tmp/vmware-config3/vmmon-only'
make -C /lib/modules/2.6.33.4/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.33.4'

[code]......

View 12 Replies View Related

CentOS 5 Networking :: DHCP Multi-Subnet From Single Server?

Oct 24, 2010

I've got a bit of a question. My network is laid out like this:

The role assignments are thus:

Firewall - sorts out the passing through to the 3 different networks, and acts as the traffic proxy.
Windows 2003 server - Does Active Directory and DNS
CentOS server - FTP and DHCP

Now, my problem is I need the CentOS server to be able to assign IP address to both networks, however, the CentOS server can *ONLY* be connected via the one interface to the firewall. It needs to assign the Windows 2003 server and the eth0 of the firewall an IP address via static DHCP, but it also needs to able to assign the clients dynamically via any address in the 10.23.1.0/24 range. I was thinking that I would be able to create static only assignments for the servers via their MAC addresses, and only have 1 dynamically assignable entry for the clients, and then get the firewall to allow ports 67 and 68 to flow freely between eth0 and eth1, but I wasn't entirely sure of the best way to do all this.

View 1 Replies View Related

Ubuntu :: Multi Users Accessing A Remote Server On Local Network

Jul 24, 2010

I would like to experiment a "green" idea of virtual desktop where multiple users are served by a single powerful machine.

I have a server running 24/7. The monitor of this machine is turned off most of the time and the OS is on the login screen.

Other users, in the same local network, use less powerful machines, which could be a thin client or an old Pentium 3 machine. They access their accounts remotely and work with the GUI as if they were sitting in front of the server. Each user sees their own desktop (different themes, screen resolution, etc.). And of course it can happen that several users could log in at the same time.

The usage is modest: mostly web browsing and the usual default applications (office, wine, gimp, etc.). In particular no games or any demanding applications. The users want to use their desktop in graphical mode only.

Question: How do we call this way of using a server? Is it possible with Ubuntu? And how to implement it?

View 3 Replies View Related

CentOS 5 Networking :: Load Balancing Multi WAN On Squid Proxy Server?

Aug 12, 2009

How To: Load Balancing & Failover With Dual/ Multi WAN on Linux proxy server I have 3 WANs connection (2 ADSL and 1 Wimax). And 30 clients on LAN.

eth0 connect with Wimax
ip= 172.23.x.x
eth1 connect with ADSL1
ip=10.10.6.x
eth2 connect with ADSL2
ip= 10.10.5.x
eth3 connect with LAN
ip=192.168.1.x

how to do Load Balancing & Failover With Dual/ Multi WAN on Linux proxy server.

View 1 Replies View Related

Red Hat / Fedora :: Format For Server & RAID Setup For Multi Platform Read/write/access?

Jun 23, 2011

I'm looking to set up a server with attached mass storage device and tape autoloader to run linux. It's set up under Windows at the moment. Goal is to have users, connecting from individual workstations and laptops, backup their data to the linux server. On their personal machine, some users run linux, some MacOS, some Windows. I plan to set up the 5 500 GB drives as RAID5. I understand that if setting up as software raid the format is "physical volume for RAID". Under this setup, will Windows users be able to read/write and function as expected? I can't assume only linux user access.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved