LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   um, Tweaking (https://www.linuxquestions.org/questions/linux-software-2/um-tweaking-65901/)

Thom_Redhat 06-16-2003 07:11 AM

um, Tweaking
 
Ok,

I've got a:-
K6-2 400mhz
256 Sdram @ 100hz
4.3 gig Hard Drive
with Redhat 9.

Partitions
100meg boot
256 Swap
256 Swap
Rest for everything else

Primary use PHP/Mysql/Apache Local Development Server.
Am using the latest versions that 'up2date' allows so, PHP 4.2.2 & mysql 3.??.56? and apache 2.0.40???

I want to spead up this computer as much as i can, i've installed Zend optimiser 1.2.0a; in a bid to speed to PHP execution time.

What other modifications new, software,tweaks etc can i add to speed this computer? Am on the bondries of the servers hardware capability already.

Usally the servers sits between 87% -> 99% ram usage.

What the mininal services that i need to run, thust this should lower my ram usage?

Remove unwanted packages? But which ones etc...
:newbie:
Thank you!!! :D

LarryDoliver 06-16-2003 08:47 AM

get to know 'top'.

removing packages that are not used will not speed up your machine. The best thing you can do is not run unnecessary processes. Run 'top', sort by memory usage, and learn what each of the big hitters are. Kill and prevent from restarting those that are not necessary to you.

If you can spend a little $$, buy ram.

Lastly, upgrade your kernel to the latest stable version. There are speed enhancements in there. And disable as much as you can (or make modules, not built-in support).

-Larry

m00nd0g 06-16-2003 08:48 AM

Try looking at chkconfig --list to see what services are started at what runlevel

to edit: chkconfig --level <levelnumber> <servicename> on|off

Hope this helps.

Thom_Redhat 06-16-2003 09:55 AM

what are runlevels =):newbie:

tcaptain 06-16-2003 10:24 AM

runlevels are well...levels at which Linux runs...

example, I know run level 3 is console mode and run level 5 is booting straight into X.

I'm not sure about the others tho.

Thom_Redhat 06-16-2003 01:15 PM

Also are these following services needed?
netfs
nfslock

Also the biggest contender is X which uses 80meg, and kdeinit which is loaded twice? Each using 11.5 meg each.

From the tops screen i could only add up about 140meg worth of ram usage. Were is the rest of the ram being used? As disk cache or?

I am also using the latest kernal from up2date.

DrOzz 06-16-2003 02:49 PM

yes it is cached for the most part...if i look at my system which has 628ram it says 538 used, but in actuality i have 415 free out of my 628 and only 213 is actually used..

tbayer 06-16-2003 03:35 PM

To find out what an RPM does type "rpm -qi rpm.name" This gives you a description, then you can figure out if you need it or not. I suggest you drop X; it is a resource hog and not needed. Trimming down all the unneeded RPMs will help, a lot of the time they run services that you don't know about.

BigNate 06-16-2003 03:58 PM

Quote:

Originally posted by Thom_Redhat
Also the biggest contender is X which uses 80meg, and kdeinit which is loaded twice?
I would unload x and learn to run those programs from the command line. All harware flys from the CLI!

Thom_Redhat 06-16-2003 04:05 PM

What is X used, for?

Sorry lads... Tonnes of questions.

Thom_Redhat 06-16-2003 04:20 PM

also, i removed x, netfs, nfslock

Ram usage is at 67%

A small script before changes was 83% PHP 17% mysql
after changes its 94% PHP 6% mysql

going good so far, i might turn the the optimisation in the zend optimiser to 8,9th pass...

Thom_Redhat 06-16-2003 04:42 PM

How do i stop X, as i carn't stop it from the services tab?

slakmagik 06-16-2003 11:42 PM

I don't think I can help with the main issue but I'll say that how I'd try to describe runlevels is that a runlevel is defined by the script init runs. The scripts have different names and contain different items. So while 'runlevel 3' is usually 'multi-user cli mode' it isn't necessarily so. The usual is that 0 & 6 are shutdown and reboot, 1 is single-user maintenance mode, I think 2 is non-networked, 3 is full cli, and 5 is usually full GUI. 4 is usually unused. But this is only because the scripts are written that way. The scripts issue commands to start services and so on. In 5, the X-server will be started, and in 3 it won't. And the X-server is a complicated piece of software I don't understand. But, in short, it provides GUI-services. Without it, you don't have KDE or Gnome or blackbox or any desktop and icons - you have the command-line interface. If you run top - or ktop or whatever - at runlevel 5, you'll see a lot more resource-consumption than if you run top at runlevel 3.

Take a text editor and load the files in the /etc/rc.d subdirectory (usually - maybe always) and comment out services you don't want or add in services you do. Those scripts will show you much of what goes on when you 'init 5' or 'init 3' and so on.

(I understand there are GUI interfaces to do this with a lot of desktops but all they're doing is writing to those text files anyway. I don't know how exact a portrayal the interface is whereas the scripts show - the scripts *are* - exactly what happens.)

m00nd0g 06-17-2003 03:10 AM

Quote:

Originally posted by Thom_Redhat
How do i stop X, as i carn't stop it from the services tab?
open /etc/inittab as root

search for the following line: id:5:initdefault:

replace the 5 with a 3.
(The number represents the default runlevel. As explained. Runlevel 5 is multi-user with X. Runlevel 3 is multi-user with command line. Both of them have network enabled.)

Then reboot your machine and now it won't startup X. All you'll have is the command line. I think this is a better method than the previous post. Disabling X in runlevel 5 doesn't make sense to me at all :)


All times are GMT -5. The time now is 05:53 AM.