Sponsored Content
Top Forums UNIX for Advanced & Expert Users echo 1 > /proc/sys/vm/drop_caches a good idea? Post 302463049 by achenle on Friday 15th of October 2010 02:39:23 PM
Old 10-15-2010
Unless you're trying to address a performance issue, I'd agree that there's no need to prevent any cache use.

Look at it this way: cached data will be discarded if anything else needs the RAM, and free RAM is wasted RAM.

Seriously: free RAM is wasted RAM.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Dual Boot a good idea?

I was just wondering if it would be alright to dual boot a machine with both UNIX using XTERM for the interface and windows 98 or if people consider this a bad idea? if you consider it bad do tell me some possible alternatives..also would it be better to get linux over pure unix? I'd like a visual... (8 Replies)
Discussion started by: PravusMentis
8 Replies

2. Shell Programming and Scripting

Limitations of awk? Good idea? Bad idea?

Keeping in mind that I'm relatively comfortable with programming in general but very new to unix and korn/bourne shell scripts.. I'm using awk on a CSV file, and then performing calculations and operations on specific fields within specific records. The CSV file I'm working with has about 600... (2 Replies)
Discussion started by: yongho
2 Replies

3. Shell Programming and Scripting

Echo escaped \c in SH Shell Any Idea

Hi All, I have got an echo statement with "\c" in it to avoid getting into a newline. Ths script is using #!\bin\sh Any idea what could make it to escape "\c" (4 Replies)
Discussion started by: asami
4 Replies

4. Shell Programming and Scripting

any good idea on this?

txt file like this, 1 2 3 4456 a bb c d 3 f e 1 k 32 d m f e 123 m 2 k every line contains 3 or more columns, all the columns are separated by space, and every column includes 1 to 3 character. what I wanna do is deleting the first three columns, and keep the rest no matter how long... (7 Replies)
Discussion started by: fedora
7 Replies

5. Linux

Kernal panic error& setuproot:error mounting /proc&/sys

Hi all, I am new to redhat/fedora linux. In fedora linux 6,we created one file system(hda3 - /fs). in this mount poing we were installed mounta vista os. while booting we are getting below error messages. 1) Booting 'mountaVisat(2.6.18_pro 500_pc_target-x86_586 smp)' root(hd0,1)... (2 Replies)
Discussion started by: arjunreddy3
2 Replies

6. Shell Programming and Scripting

Compact script with array - Good idea?

Hi, I have a shell script where a lot of the code is repeated. I wanted to make the code much more compact so I spoke to a guy and he suggested using arrays, like follows: #!/bin/bash readonly -a nginx=('nginx' '--prefix=/opt' '-j 4' 'http://nginx.org/download/nginx-1.2.2.tar.gz' )... (2 Replies)
Discussion started by: Spadez
2 Replies

7. Solaris

Drop_caches doesn't work on Solaris but works on RHEL6

Hello Experts, I am performing performance tests on a few mysql select queries. I use the following command to clear the memory disk caches. sync && echo 3 | sudo tee /proc/sys/vm/drop_caches I however see that the above command works on RHEL6 but doesn't work on Solaris 10. I asked... (4 Replies)
Discussion started by: Anirudh Kumar
4 Replies

8. IP Networking

Cat /proc/sys/net/ipv4/ip_local_port_range

Hello, /proc/sys/net/ipv4/ip_local_port_range returns 32000 - 61000, i have a client TCP and a Server TCP. i have used bind() only on the server, the port of socket client is given by the OS that's it ? it retrieves this port from this range (/proc/sys/net/ipv4/ip_local_port_range) ? ... (5 Replies)
Discussion started by: chercheur111
5 Replies
DPHYS-SWAPFILE(8)					      System Manager's Manual						 DPHYS-SWAPFILE(8)

NAME
dphys-swapfile - set up, mount/unmount, and delete an swap file SYNOPSIS
dphys-swapfile setup|swapon|swapoff|uninstall DESCRIPTION
dphys-swapfile computes the size for an optimal swap file (and resizes an existing swap file if necessary), mounts an swap file, unmounts it, and and delete it if not wanted any more. OPTIONS
There is only one parameter, an command, which can be either of these: setup Tells dphys-swapfile to compute the optimal swap file size and (re-)generate an fitting swap file. Default it 2 times RAM size. This can be called at boot time, so the file allways stays the right size for current RAM, or run by hand whenever RAM size has changed. swapon and swapoff These run the swapon and swapoff commands on the swapfile. Note that direct swapon/off from /etc/fstab is not possible, as that is (at least on Debian) done in the same script that mounts /var (which is where the swap file most likely resides). And we need to do our setup between those actions. So pass up /etc/fstab, and do our own swapon/off. uninstall Gets rid of an unwanted swap file, reclaiming the disk space. CONFIG
The config file /etc/dphys-swapfile allows the user to set up the working environment for dphys-swapfile. This config file is a sh script fragment full of assignments, which is sourced. Standard sh syntax rules apply. Assignments are: CONF_SWAPFILE Set where the swap file should be placed. Defaults to /var/swap. It is unlikely that you will need to change this, unless you have very strange partitioning, and then you will most likely be using an swap partition anyway. CONF_SWAPSIZE Force file size to this. Default is 2*RAM size. This is unlikely to be needed, unless in strange diskspace situations. Note that swap enabled and smaller than RAM causes kernal-internal VM trouble on random systems. CONF_SWAPFACTOR Set the relation between RAM and swap size. Must be an integer. Defaults to 2 which means swap size = 2 * RAM size CONF_MAXSWAP Set maximum size of the swap file in MBytes. Defaults to 2048 which was the former kernel limit for the swapfile size and is now a limit to prevent unusual big swap files on systems with a lot of RAM. FILES
/etc/dphys-swapfile user config $CONF_SWAPFILE the swap file, target of the whole action (defaults to /var/swap) EXAMPLES
dphys-swapfile is usually run at system startup and shutdown from an /etc/init.d (or /etc/rc.d) script, such as this (minimal) one: #!/bin/sh # /etc/init.d/dphys-swapfile - automatically set up an swapfile # author franklin, last modification 2004.06.04 # This script is copyright ETH Zuerich Physics Departement, # use under either modified/non-advertising BSD or GPL license case "$1" in start) /sbin/dphys-swapfile setup /sbin/dphys-swapfile swapon ;; stop) /sbin/dphys-swapfile swapoff ;; esac exit 0 If an sysadmin wants to have his swapfile in annother place, say /var/run/swap, he can use: In /etc/dphys-swapfile: CONF_SWAPFILE=/var/run/swap AUTHOR
franklin@phys.ethz.ch, http://www.phys.ethz.ch/~franklin/ D-PHYS Swapfile Tools 2006.09.15 DPHYS-SWAPFILE(8)
All times are GMT -4. The time now is 08:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy