Can I Limit Apache's Cpu Usage

Feb 2, 2007

I have a server running Apache 2 with php 5 as an apache module. There are 2 PHP scripts that get about 500k hits a day. These scripts have to parse data out of a remote webpage and display it on an image. They used to make loads go up to 40-50, but I have added a cache which only updates every 4 hours. This helped a lot, but loads are still around 10 when the script updates, and it slows down the server. Memory usage is fine.
The server is an AMD Athlon 64 2800+ with 1 gb of ram and an 80GB SATA hard drive.

Here's `top` when the cache had just been cleared.

Quote:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
28004 named 16 0 121m 11m 3796 S 12.3 1.3 0:00.96 apache2
28003 named 15 0 121m 11m 3740 S 12.0 1.3 0:01.00 apache2
5316 tarball 15 0 43032 29m 2320 S 11.3 3.1 326:08.68 ircd
27998 named 16 0 121m 11m 3808 S 11.3 1.3 0:00.51 apache2
27989 named 15 0 121m 11m 3800 S 10.3 1.3 0:01.14 apache2
28007 named 16 0 121m 11m 3776 R 8.0 1.2 0:00.24 apache2
28008 named 15 0 121m 11m 3776 S 7.0 1.2 0:00.22 apache2
27979 named 16 0 121m 11m 3752 R 6.0 1.3 0:02.06 apache2
27983 named 16 0 121m 11m 3748 R 6.0 1.3 0:01.94 apache2
27985 named 15 0 121m 11m 3748 S 6.0 1.3 0:01.05 apache2
27992 named 16 0 121m 11m 3792 S 5.0 1.3 0:00.33 apache2
27980 named 15 0 121m 11m 3796 R 2.3 1.3 0:03.24 apache2
28009 named 15 0 121m 11m 3796 S 1.7 1.3 0:00.82 apache2
27715 root 15 0 5192 1164 844 R 0.3 0.1 0:00.94 top
27960 named 15 0 121m 11m 3808 S 0.3 1.3 0:01.42 apache2
27984 named 15 0 121m 11m 3804 S 0.3 1.3 0:01.94 apache2
27987 named 15 0 121m 11m 3796 S 0.3 1.3 0:01.04 apache2
28006 named 15 0 121m 10m 3292 S 0.3 1.2 0:00.50 apache2

Idle CPU usage usually goes anywhere from 30%-0%. Is there any way to limit apache from using more than 75% cpu, or any other ways to drop cpu usage?

View 10 Replies


ADVERTISEMENT

How To Limit Accounts By Cpu/Ram Usage

Sep 22, 2008

some web hosting company limit cpu/Ram and if any account do high load it will suspended some time automaticly and unsusprnded after some time auto

View 0 Replies View Related

Limit Apache Usage And

Oct 23, 2007

i have one centos dedicated server and cpanel i will going to apache status is very request link and 2 site are very high in the list and my apache worked very hard and going to down any hours of your seems i must how control it?

View 7 Replies View Related

Memory/CPU Usage Limit Tools

Jul 28, 2007

what tools are available for Fedora 4 that allow an admin to set limits on how much memory and cpu usage clients can use. I have plesk 8 but I can't seem to find anything related to it in there, and I set up webmin as well,

View 2 Replies View Related

How To Limit Bandwidth Usage Per User Per Day

Nov 24, 2007

I run 10+ sites on my dedicated server.In last 7 days one of them used over 1.7 TB of bandwidth.

I can't suspend that domain because it's mine.

I can't ban the IP of those who use considerable amount of bandwidth because they are a lot.

So i think about software/mod/whatever else that limit bandwidth usage per user(IP) per day! is there any one who has experience about this situation?

View 7 Replies View Related

How To Limit Resources ? (cpu, Memory Usage)

Sep 6, 2007

How can I limit my dedicated server's resources ? For example, one of reseller provider's limits :

Quote:

Resellers may not use more than 2% CPU daily, 3% memory daily, run more than 10 simultaneous processes per user, allow any process to run for longer than 30 seconds CPU time, run any process that consumes more than 20% of available CPU at any time, or run any process that consumes more than 16 MB of memory. Databases are limited to 16 max user connections with a max query time of 8 seconds. Cron jobs must not execute more than once every 15 minutes and will be niced to 15 or greater.

From where or how can I configure these limits?

View 2 Replies View Related

Windows 08 - IIS7 - Limit Disk Usage & FTP

Aug 30, 2008

I'm starting a webhosting business in the next few months (working on the panel), and was wondering what is the best method to limit the amount of disk usage the user can use? I know about Disk Quota, but that would be a pain to use. Is there anything built into IIS7?

Also, is it possible to use a SQL 05 DB for FTP user accounts with IIS7? If not, is there any other way to have FTP accounts *without* having to create a windows user account?

View 5 Replies View Related

Plesk 12.x / Windows :: Limit Reseller Self-created Service Plan Resource Usage

Jan 23, 2015

When a reseller create a service plan themselves...is there any way to limit the CPU and memory setting for the application pool to recycle on their own created plan?

View 2 Replies View Related

How Limit IP

May 28, 2009

IM using ngNix web server!

how i can limit ip in some range... ?

we found some site , but worked in apache .htaccess...

how do that in ngnix?

View 1 Replies View Related

4 Gb RAM Limit

Jan 30, 2007

I have a server with the following specs:

2 x Xeon 2.0 Ghz
4 x 2 Gb DDR RAM (8 Gb total)

I am trying many OS's but none of them worked as it should:

- Windows 2000: install aborted
- Windows XP: install aborted
- CentOS 4.4: install OK but Kernel panic on start-up
- CentOS 3.8: instal OK, only 3.8 Gb identified but the OS out of 8 Gb
- CentOS 3.8 64 bits: couldn't install, CPUs support only 32 bits

Add to this, the machine boots on EL Kernel on CentOS 4.4 but not on the SMP Kernel!

how I could run this machine on Linux with 8 Gb RAM?

View 7 Replies View Related

Set MTU Limit

Jul 5, 2007

how to set MTU limit in linux (OpenBSD)?

View 5 Replies View Related

How Limit All Of World Instead Of One Ip

May 14, 2009

i want to limit all of the world to access my server for example port 80 25 22 an .... instead of two ip.

View 9 Replies View Related

Limit Mysql

May 15, 2009

i dont want clients taking the servers I/O and server load over 4.00 when they do major update ect... querys on sql. is there a way to limit the ammount they can do?

View 4 Replies View Related

Bandwidth Limit

Oct 30, 2009

I am going to run a VPS as a VPN proxy server and therefore I was asking myself if it is possible to freeze or shut down the VPS before it exceeds it bandwidth limit of 100GB a month?

View 6 Replies View Related

How Can Limit FollowSymLinks

Apr 30, 2009

How can limit "FollowSymLinks" just to user directory?

As you know anybody can make a "SymLinks" to every directory.

Im using whm/cpanel on my server.

View 3 Replies View Related

Can Vps Limit Cpu Resource

Dec 4, 2008

i know admin can limit the ram and hd resource for each vps account,

but about the cpu,

can admin limit how many percentage or MHz or each vps account?

View 4 Replies View Related

Apache 2.2 With Limit IP Mod

Jan 6, 2008

Anyone know if the mod_limitipconn works with Apache 2.2?

View 8 Replies View Related

Limit Connections Per IP

May 15, 2008

How can I Limit connections per IP in IIS6?

For example 10 connection per IP is allowed in a minute.

View 0 Replies View Related

Bypassing 3GB RAM Limit

Jul 23, 2008

My server has 8GB RAM, however processes are limited to 3GB it seems, even if most of the memory is free (I have a mathematical program that mmaps lots of files and needs more than 3GB). I read somewhere that this is because the OS is 32-bit, but that it could be bypassed with "hugemem" kernel support.

I doubt that my host would install this for me, so how can I do this myself without breaking my server I've never done anything like alter a Linux kernel. My current OS is:

Linux 2.6.9-67.0.20.ELsmp #1 SMP Wed Jun 18 12:40:47 EDT 2008 i686 i686 i386 GNU/Linux With WHM 11.2.0, cPanel 11.11.0-S16999, REDHAT Enterprise 4 i686 - WHM X v3.1.0.

View 14 Replies View Related

Limit # Ip Connections

May 31, 2008

on setting up some sort of firewall who only allows 10 connections from the same ip to avoid spamming, abuse on the server.

How should i do this?

View 3 Replies View Related

Suspend At Limit

Dec 12, 2008

I recently used these forums to help narrow my search for a reliable, competent host. I choose to avoid the larger hosts that sells unlimited or large amounts of disk space and bandwidth. I went with a smaller host that sells a 1GB disk space and 10GB bandwidth package that is reasonably priced. Keep in mind that my site is new and will likely only be visited by friends and family. I feel this package is appropriate for my needs.

Should I be concerned about a host that will suspend my site if I reach my limit? As a customer I would rather be notified to upgrade my account instead of having my site suspended. This practice of automatically suspending sites may very well be the normal procedure for most hosts thus the reason for my post today. Please share your opinions on this topic.

View 6 Replies View Related

Limit CPU/RAM Per Account

Aug 28, 2007

How do you limit CPU/RAM per account on a shared web server without virtualization? Something like what Dreamhost is now offering, for instance for user "john", assign 256MB of RAM and 10% of CPU. Without Virtuozzo and friends.

View 8 Replies View Related

How To Limit Downloads

Nov 20, 2007

i have alot of files on my server, each of one more 60 mb

can i limited download
so when somebody download file cant download other file in same time?

and pervent using if programme to download?

and also now
Server Load 0.94 (2 cpus)
Memory Used 50.9 %
Swap Used 5.59 %

and i see in top

/usr/local/apache/bin/httpd -DSSL

many time and kill the memory

all thing about my server here

[url]

View 6 Replies View Related

How To Limit Users RAM/CPU Use

Nov 18, 2007

I have a dedicated server with CentOS and cPanel/WHM

I want to know how would I limit each user usage of RAM and or CPU

I see HUGE web hosts are doing that , they give you 9999999 diskspace and 99999999 bandwidth but they limit your RAM & CPU use to a tiny number

I want to know how could I do that in order to keep my resources good .

View 7 Replies View Related

Limit Box Ip On Apache

Jul 8, 2007

Im running the latest version of apache on my box and have 15 ip's on my box. Each ip goes to the site hosted on apache is there a way to limit it to one. Say for example i have these ips on my box 1.1.1.1 - 1.1.1.15

How do i select one of those ips to go to the site and have the rest not go anywhere.

View 6 Replies View Related

APF With Numiptent Limit Of 250

Jul 14, 2007

im trying to run APF, but i am getting memory allocation faliures from iptables. I havent gone nuts on the rules just a simple firewall scheme for cPanel.

Is it possible to run APF with numiptent set to 250? Is this something the VPS provider will increase without problem?

How about if i can i trim the APF down such that all rules will fit in memory? I already disabled the list downloading (near the bottom of the file) and i get less memory errors but i still exceed my 250 limit.

View 6 Replies View Related

How To Limit FTP Access

Jul 20, 2007

Is it possible to limit FTP access when hiring someone to work on a site/script. I'd like to limit the access to certain folders and files.

View 2 Replies View Related

DreamHost 7mb Upload Limit (php.ini)

Nov 30, 2006

Has anyone overcome the php.ini problem at DreamHost?

I am trying to upload .wmv video files around 20mb and of course they timeout after around 7mb.

I found this bit of chatter on the net but I am still stuck: ....

View 5 Replies View Related

Limit What IP Reseller Accout Can See??

Jan 17, 2007

Please point out a way so that I can limit what IP my resellers can see. Right now they see every IP that was assigned to my server.

View 5 Replies View Related

Limit Users In PureFTP

Apr 2, 2009

Is there any option to limit users only to upload (No other permissions like permission change, directory access etc, only upload) in FTP.. I am using PureFTP..

I have seen options to do it in ProFTP, like below,

<Limit APPE MKD XMKD READ DIRS>
AllowUser username1
AllowUser username2
</Limit>

Is there any option to set in PureFTP ?

View 1 Replies View Related







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