CentOS 5 :: Limit The Ram Usage Up To 4GB?
Aug 18, 2010I need to limit the ram usage under the below scenario,
" having 8GB of ram, need to limit the ram usage up to 4GB, thereafter must use swap only"
I need to limit the ram usage under the below scenario,
" having 8GB of ram, need to limit the ram usage up to 4GB, thereafter must use swap only"
I was looking into using control groups to limit the memory usage of each user on my CentOS system. I was told that this required me to recompile the kernel to have cgroup support. Is this true? Or is there a kernel module that will allow cgroups to work for users and groups on the system without kernel re-compile? Or, is there another way to limit the users memory usage? I have tried ulimit and it doesn't seem to work right.
I ask since this setup will be on a VPS system, that means to re-compile the kernel I need to use Xen instead of OpenVZ. Plus I have never in my life re-compiled the kernel, least of all with different modules ha ha ha so I would have to pay my NOC to do it. So if I don't HAVE to recompile the kernel to get cgroup support.
Everytime CPU reaches around 85% of maximum it shuts down due to overheating. What I want to do is be able to throttle the cpu to 75% so it never goes above that. I don't want to just throttle individual programs which I think is what CPULimit does right? The fans are failing but I can't afford to get fixed. I just want to use it for email and web browsing usually.
I have cleaned dust out, use in a well ventilated room, use a cooling stand etc but still when CPU gets to approx 85% then whala it shuts itself down. Have been using with XP but just switched to Ubuntu and have only had it shut down once so far.
I'm writing a shell script which aims to create a safe gtared (xxx.sql.gz) copy of MySQL databases.This script is planned to be Cron-Jobed.
Well, what I need to add to this shell, is something that limit CPU usage for the whole process (just in case if the database being generating is a huge one.)So, after few time of googling I found couple of solutions:
- Using cpulimit.
I tried to place the code in Position(1) and Position(2) but it didn't seem to be working fine.. Any idea about the right use?
And the other Solution is:- Using nice.
Well, assuming I named my shell script (sqlbacker)..
Finally, this is my first time I ever write a shell, so correct me if somewhere I made a mistake :-)
(The script itself works perfectly)
There's a disfunctional process eating copious cpu time.Is there a way to effectively assign it a high nice value? I need to do this whenever it runs, for whatever reason, and I can't be bothered to track down all the scripts and scenarios that cause it to run and change the script to use nice. And I can't be bothered to manually run renice whenever I notice that it's running.
I want the OS to automatically assign a high nice value to this process, perhaps based on the processes name. Is this possible?Presumably, a cron job could run every 5 minutes and run "renice" on every process matching a given name, but I'm hoping for a solution with more finess.
I recently read a windows tip which read: - Windows allots 20% of the bandwidth by default for various services like Windows update, spyware checks etc. We can get hold of this bandwith by changing the values of limit reserve bandwidth under QOS packet scheduler. Now my questions: How to limit the bandwidth usage used by ubuntu updates in the above lines?
View 4 Replies View RelatedI've written a program for a class that my professor will be testing in various low memory environments to see how it behaves when the program runs out of memory. Is there a way I can simulate the execution in a low memory environment without creating a virtual machine?
View 1 Replies View RelatedI have a webserver with a few users on and i wonder how i can limit the bandwith usage for each user on my server ?
View 1 Replies View RelatedHow can I limit printer usage by SAMBA server?
View 6 Replies View RelatedCan I, with only the use of IPTABLES, limit the incoming bandwith for a protocol? We have for example servers that have a FTP and HTTP server running and whenever HTTP has a lot of connections open, the other uploads/downloads get a timeout. I know I can limit the number of connections but prefer to limit on protocol level. Is this possible using IPTABLES and if so, can someone indicate how to proceed or provide a link? If it's not possible can someone point me to the right tool for the job?
View 6 Replies View RelatedI've noticed that "su" can be run from any user account so long as the user knows the root password.What if I want to limit the ability to "su" to only 1 user account? For example: Pretend my desktop has 4 different user accounts. Currently each user account could run "su" for root access if the person sitting in front of the screen knows the password.
1) Could I somehow make only 1 of the 4 user accounts able to "su" into root mode?
2) If yes, then would doing so have any side-effects?
I'm running CentOS 5.5 64bits. I tried today to create a 5GB test file as unprivileged user and the process limited the size at 2GB:
$ ulimit
unlimited
$ time dd if=/dev/zero of=test.bin bs=5000000000 count=1
0+1 records in
0+1 records out
[Code]...
I want to change back_log for mysql, but in documentation said OS has it's own limit. how can i check what that limit is?
View 1 Replies View RelatedHow to limit network speed? Is there any apps in Centos can do that?
View 1 Replies View RelatedIs it possible to limit each user so that only one can connect via each username for ssh/sftp? I work with a small company where there aren't really enough of us to justify using a revision control system, but we don't want to accidentally step on each other's toes, so we'd like to try simply preventing more than one person from accessing a given domain at once.
View 15 Replies View RelatedDoes anyone know if there is a limit to the number of virtual guests you can have in kvm. RHEL has a limit of 4. RHEL AS is unlimited. What is CentOS?
View 1 Replies View Relatedmy secure log is flooding with these messages..
sudo: pam_limits(sudo:session): wrong limit value 'unlimited' for limit type 'hard'
Dec 28 22:42:29 yn54 sudo: pam_limits(sudo:session): wrong limit value 'unlimited' for limit type 'soft'
Dec 28 22:42:29 yn54 sudo: pam_limits(sudo:session): wrong limit value 'unlimited' for limit type 'hard'
I use CentOS 5.3 and trying to change limit of max. open files.I added in /etc/security/limits.conf
root soft nofile 50000
root hard nofile 50000
for create an user I put:
useradd username
passwd username
I have a VPS server with 512 MB memory. The php.ini is set so script memory limit = 16 MB. However, I have noticed in my top report, instances like the following:
Quote:
5484 coldclim 25 0 46476 32m 5920 R 0.0 6.4 0:00.93 php
The bold number of 6.4 is the % of sever memory this process is using. 6.4 % of 512 MB of memory is about 32 MB of memory, so it appears that this isn't being limited by php.ini. Am I correct? This leads to the next question: Is there some way to limit the amount of memory a single suphp process can use? (Basically, something like the setting in php.ini which limits suphp processes in the same way.)
How to number of connections for a single ip on port 80 to CentOS 5.5 with iptables? connlimit did not work on CentOS and nginx does not provide a module for that
View 4 Replies View RelatedI just want to place upload/download limit to each ip address ( say 20MB per day for each ip or specific ip) using squid proxy i tried through delay pool but it control only download/upload speed not place any download/upload quota restriction. following are my codes I have 1Mbps line
delay_pools 2
delay_class 1 2
# here 700kbps(87Kbytes) Net-Total usage limit, with 50Kbytes per user
[code]...
I also used
"reply_body_max_size" parameter to control upload limit.
But
"request_body_max_size" only restrict download based on size.
how to setup quota ( download quota per day per ip)
I have an external sata dock for hdd that give me a lot of error till linux decided to lower the speed of it to 1.5 then it start work well
View 2 Replies View RelatedWe've been experiencing sudden host server crashes minutes after starting a fourth virtual machine. Our setup looks like:
Dell Poweredge T300
1 x Intel Xeon X3323 Quad Core 2.5 ghz
16 GB Ram
CentOS 5.3 (64 bit)
Server is running a stripped down version of CentOS 5.3 (64-bit), running only the built-in Xen Virtualization Environment. There is no other services running on the server (not samba, httpd, sendmail, cups... nothing except Xen) We've created several virtual machines, and as long as we don't start a fourth virtual machine everything runs smoothly (impresive hardware).
Each virtual server is configured as:
PARAVIRTUALIZED
1 Virtual CPU
1 GB RAM
However, 5 minutes or so after starting a fourth virtual machine, the entire host server crashes and restarts itself. Are we limited by the number of cores on the host machine CPU (4 cores)? 1 for the host and 3 for virtual machines? We've read in forums about other Xen setups running up to 11 virtual machines on less powerful hardware? (a dual core server). Should we be using FULLY VIRTUALIZED virtual machines instead? Is the number of XEN virtual machines in fact limited by the number of cores? If so, how can someone run several virtual machines on a single core host?
By the way, we were replacing a previous Dell Server (Poweredge 2600 with 512 MB Ram and a single Xeon single core processor running Open Virtuozzo). We were able to run up to 16 virtual machines at the same time. Of course none of the machines endured hard work (testing environments, etc). But hey, my point is that we expected to get a much higher number of virtual machines on this new hardware.
I'm trying to set up quota limit in samba-3.0.33-3.15.el5_4.1 in CentOS 5.5, by means of the module vfs objects. In the samba howto [1] I found a very brief explanation, but it isn't working for me. The basic idea is to setup a user called 'quota2g' (uid 499) and setup the [homes] share, as it comes by default, to enforce the quota on each user share.quota2g:x:499:499:User quota 2GB:/home/quota2g:/bin/bash
View 1 Replies View RelatedI am calling clock_gettime() function to get time with nano seconds accuracy. My program works fine on Ubuntu but have high CPU usage problem on CentOS 5. it takes 40% CPU on Ubuntu and 90% CPU on CentOS. Kindly give me solution so that I can reduce high CPU usage problem on CentOS. You can build this code like: "gcc -lrt gettime.c -o gettime.e"
[Code]....
I am trying to get my head around my new server. I am using CENTOS 5.4 x86_64 with 300GB harddrive.
The 300 GB been partitioned with the following:
Device Size Used Available Percent Used Mount Point
/dev/md0 99M 18M 77M 19% /boot
/dev/md1 16G 8.7G 5.8G 61% /
/dev/md2 246G 40G 194G 18% /home
/dev/md3 4.8G 1.6G 3.0G 35% /var
/usr/tmpDSK 3.9G 432M 3.3G 12% /tmp
I have increased teh tmpDSK as it was getting full very quickly. My question is, what are these md0; md1, md2 and md3 are they harddrive partitions and as md1 is getting full will that have an impact on my sites.
My Centos PC has got 1 gig of rams. I'm running a webserver with 2 websites and a mysql service. also i need to start two other programs, which uses ~300-350 mbs/each. My memory usage without them is around 450-500 without them. It was 100MB~ free with everything i need on a sec ago. I've refreshed those two sites and it was ~50 left. SO what, site refresh for each user takes 20 megabytes or something? Is there any way to lower the overall usage without turning off mysql, apache and the two other programs? If there is how? And about number read, it says in the top command on mem like 4.4, 1.2, 2.0, etc.
What does that mean? I thought it's like 2.0=20 megabytes, but it doesn't add up to 450-500 then. And by the way, swap memory is 0kb. I have no possibility adding more rams except paying more 5 dollars a month for another 512. 5$/month is a lot for me (sounds funny)? Check out my country, you'll have to rethink. Especially being a student with no possibility to find a job). As for webhostings, i cannot find anything for free, that I could host my wehsites with ping less than 100 actually. Or <80 if say, then it's php memory limit is too low for my WP blog needs.
Im looking for an app pr line of code that could let me observe a process, save the info in a number of variable and then put the gathered info on a file.
Ive been trying with variations of top but no luck. I am running several CentOS virtual servers, VM is 2gb ram 2 processor.
Maybe a script that works over a specified amount of time while writing lines with the info on a text file so at the end i can have a sort of table with the data.
The thing is Im going to stress test the server and I would like to have the data to make some statistics.
is there any software which can show us real time monitoring of ISA2006 usage(for example as we can see in WinGate software)
View 1 Replies View Related