Hardware Reference
In-Depth Information
Create an ifcfg-eth0 file under /etc/sysconfig/network-scripts/ . It may look
something like Figure 2-16 . Don't try and use the ifcfg-usb0 file; remove this file to make
the network start cleanly.
1.
Figure 2-16. Example of an ifcfg-eth0 file
Ensure that you have your /etc/resolv.conf set up to have your DNS servers set and
/etc/sysconfig/network to have your default gateway set.
2.
3.
Set the network to start on boot and to not fall back to DHCP by running this command:
# service network start
4.
Ensure it starts up on the next boot:
# chkconfig network on
Another small tweak you can do is change the number of TTYs running. I don't feel you need six active TTYs.
Take a look at the file /etc/sysconfig/init . You will see a line that looks like this:
ACTIVE_CONSOLES=/dev/tty[1-6]
You can change the six to a three, which will spawn only three TTYs on the next reboot. You can see the change
to the init file in Figure 2-17 . This will only get you a small amount of performance, but it all helps.
Figure 2-17. TTY spawn settings
I/O Tuning
Lastly I want to talk about the I/O scheduler. An I/O scheduler is responsible for controlling how the block-level access
requests are handled. In the case of the Raspberry Pi the block device is your SD card, and an example of access could
be the syslog daemon writing log files to the disk. This is where the I/O scheduler comes into play. Say, for example,
that you have syslog doing its thing and writing logs and now you want to save that OpenOffice document you're
working on, what now? It's not like you can just yell out to the syslog process and ask it nicely to stop writing because
you need the disk at the moment. The solution to this is the I/O scheduler. The I/O scheduler will decide who needs
access and in what order they can have access. It can create a queue of I/O requests and decide the order in which
each needs access to the underlying block device. By default, Linux uses the CFQ, or Completely Fair Queuing, I/O
scheduler. This I/O scheduler works very well for most users and most common drives. There is a good reason why it's
the default option for the Linux kernel. The CFQ scheduler is designed to be fair to all running processes and aims to
avoid starvation of I/O to any one process.
 
Search WWH ::




Custom Search