Re: rpms compile on RH9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Haxby wrote:

Joe wrote:

This small sample of settings have collectively made a huge difference on the systems I manage.

in /etc/fstab
-------------------
mount all systems noatime
mount filesystems other than /boot /root with data=writeback


This one is dangerous is there is any likelihood of your machine crashing unexpectedly, e.g. power cuts, children pulling plugs, tripping over wires. If you're going to do it, measure the performance change and see if you are prepared to live with the risk. Check the other things first, like making sure that DMA is enabled on your disks.

Ah yes, I forgot to mention that one - dma makes a big difference too - /etc/sysconfig/harddisks should be edited to suit. You will probably also want to make arrangements for the cdrom as well - that make the difference between jerky playback and smooth playback of DVDs or VCDs -




Turning off atime will break some programs. You'll often find cron jobs that clean up files that haven't been read in a while. If the atime isn't updated then that won't work. When debugging programs that are supposed to be reading configuration files and don't appear to be, then it's useful to do an "ls -lu" to see if the file has in fact been read -- with noatime this won't work either. "noatime" is useful for file systems that are very busy (e.g. a large message store) that doesn't depend upon needing to know the access time, ever. You do need to be careful with this one though and unless you have a very busy disk subsystem it's not worth the effort. For most users, you're unlikely to see a positive benefit from this one -- users that will see a difference are on the edge of what their machine is capable of, if not slightly beyond it.

Yes there are some potential situations where atime could actually be used - but a great many systems will be fine without it, test and see. The thing is, noatime can be turned on or off on a per-partition basis, if there is one partition where it turns out to be needed.



in /etc/syslog.conf ------------------------ change logging to asynchronous:

*.info;mail.none;authpriv.none;cron.none -/var/log/messages
authpriv.* -/var/log/secure
mail.* -/var/log/maillog


I can't see this making a big difference unless you're doing a heck of a lot of logging. If you're doing that much logging, then you have more serious fish to fry. By "a lot" I mean megabytes per hour.

Well it may not make an appreciable difference in a lot of cases, but as I said, I did see a difference on our mail servers.


in /etc/sysctl.conf
---------------------------
net.ipv4.tcp_sack =0
net.ipv4.tcp_timestamps =0
net.ipv4.tcp_window_scaling =0
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time =1800


I can't comment on these, but reducing the keepalive time from two hours to half an hour doesn't look like a performance improvement, although it can work around connection timeouts in some state-full routers


in /etc/nsswitch.conf ------------------------------- passwd: files shadow: files group: files


[etc] Not convinced. Deleting the extras will only make a difference if you're looking up stuff that doesn't exist. This does happen from time to time, and the affected commands (netstat, iptables, lsof, etc) provide a switch to turn lookup off -- in general it doesn't make any difference though.

I've seen ls -l or similar commands take a lot longer when the system is trying to use a non-existent nis service etc - maybe not lately, but I have seen such things.



in /etc/profile ---------------- export LANG=en_US


This actually is quite a big one. Not a lot of use to me in the UK, and not a lot of use to someone in, say, France. Basically, if you turn off UTF-8 then a lot of commands will run a lot faster -- grep is the one that springs to mind most. If you look through the start-up scripts, you'll see lots of places where UTF-8 processing is turned off. If you've got a modern machine (mine is a 2.2GHz P4, only slightly obsolete :-)) then you won't notice unless you're grepping a gigabyte of data.

I actually saw a big difference on this one grepping for a string in /etc/squid/squid.conf on a brand new RH9 firewall/squid proxy box - I was somewhat alarmed when the box was thrashing for a number of seconds on a simple grep of that smallish file - I eventually stumbled across the LANG setting and the same grep took a fraction of a second and of course no appreciable CPU load. Huge difference, believe me!



Thanks for your comments, very good feedback


Joe


-- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux