I picked up an USB3 64GB PNY thumb drive and installed clearOS on it, can i hold up to the frequent writes from the OS?
System has 16GB of ram, so i imagine it isn't caching and is probably writing to logs files. Is there away to tame the writing to logs??
System has 16GB of ram, so i imagine it isn't caching and is probably writing to logs files. Is there away to tame the writing to logs??
In Hardware
Share this post:
Responses (1)
-
Accepted Answer
There are a number of things you can do to help reduce wear on the drive, a few examples follow... google on how to perform these actions - if you get stuck come back and ask here...
1. Use the option "noatime" in /etc/fstab for /boot / etc
2. Mount /tmp in memory - add this to the bottom of /etc/fstab
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
3. Ensure "deadline" is the scheduler ("/sys/block/sdX/queue/scheduler" where "X" is your drive)
4. Change "vm.swappiness" to 1 and add "vm.vfs_cache_pressure=50" to /etc/sysctl.conf
5. If you must use squid (e.g. as a proxy only) set a "null" storage type (cache_dir /tmp null) and ensure the maximum object size is fairly small
6. Put a minus sign before the filename in rsyslog.conf to stop immediate write syncs e.g.
"kern.* -/var/log/kern.log" (note if your system crashes you might lose the latest log messages doing this)
7. For messages classes you think you can do without, set them to log to /dev/null in rsyslog.conf
8. If you have another linux server you could turn on remote logging and send all the log messages to the remote machine.
9. For programs you will need to research how to change the logging level for each one. For samba as a example you will see something like this extract in /etc/samba/smb.conf
...
# Logging
syslog = 0
log level = 1
...
there are levels from 0 to 10, 0 is no logging and 10 extremely verbose...
Some of these changes will require a reboot... program conf file changes a restart...
and last of all have a spare USB drive all set-up and ready to go for when the USB drive in use fails :-)
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »