Sponsored Content
Full Discussion: Query on RAM Memory
Operating Systems Linux Red Hat Query on RAM Memory Post 302559438 by cero on Tuesday 27th of September 2011 05:09:07 AM
Old 09-27-2011
If you really need to get the cached value low you can
a) make the application on that box use direct I/O (recommended if its a database or another application that caches itself) or
b) tune your system to use less fs-cache which will most likely degrade that systems performace. Have a look at the sysctl utility for this and be sure you know what you're doing before using this approach.

Edit: I second pludis and Tommyks advice to adapt your monitoring script as the best solution to your problem...

Last edited by cero; 09-27-2011 at 06:15 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Amount of RAM (Memory)

How do i check/get the total amount of RAM, on a machine running UNIX? (4 Replies)
Discussion started by: samudimu
4 Replies

2. Solaris

RAM Physical Memory usage by each Process.

Hi All, I am trying to find the physical memory usage by each process/users. Can you please let me know how to get the memory usage?. Thanks, bsraj. (12 Replies)
Discussion started by: bsrajirs
12 Replies

3. UNIX for Dummies Questions & Answers

How to accurately determine memory (RAM) information

I'm writing a shell script to display as much useful information on physical and virtual memory availability and usage as possible. I need a CLI tool to print these numbers for me. The utilities that I know to give out some statistics are the following: free top vmstat sysctl In Linux... (1 Reply)
Discussion started by: fiori_musicali
1 Replies

4. Filesystems, Disks and Memory

RAM memory checker / bad lister

A bit of background I'm running a Nexenta (OpenSolaris kernel + a number of Debian tools) server running a ZRAID of 3x 1TB SATA2 drives (essentially a RAID5 formatted in ZFS, for those who aren't familiar with zpools). When running the ZFS scrub command (ZFS's equivelent of fsck) I get a number... (0 Replies)
Discussion started by: laumars
0 Replies

5. Solaris

RAM memory display

Hi How to display RAM memory info under Sol10 ? I need info like : - how many slots is available in MoBo - how RAM is plugged into those slots - total number of RAM memory size and size divided in each slot ths for help. (2 Replies)
Discussion started by: presul
2 Replies

6. Shell Programming and Scripting

Retrieve RAM memory size from "top" command output

Hi, I am trying to get the system RAM size from "top" command's output by the following but it is not working. top | sed "s/^Mem.**\(*\), *//" (10 Replies)
Discussion started by: royalibrahim
10 Replies

7. Solaris

Ram memory fails.

Hi All, Ram memory always fails,i did not find the reason...........any one can help i this.:wall: (2 Replies)
Discussion started by: Rajesh_Apple
2 Replies

8. Ubuntu

Find defective ram memory

How do I find if I have defective ram in my computer. I don't have a cd-rom, so I can't use a bootable cd. (1 Reply)
Discussion started by: locoroco
1 Replies

9. Programming

Memory Allocation Query

When we dynamically allocate the memory say 100 integers say int *x = new int(1000); then does entire chunk of memory gets allocated at once after the completion of the statement? I mean will the the concept of page fault come into picture over here? (3 Replies)
Discussion started by: rupeshkp728
3 Replies

10. Filesystems, Disks and Memory

Maximum Memory RAM for windows 7 32 bit

Hi, i have just installed 4 gb RAM ddr3 on OS Windows 7 32 bit. In "manage peripherals" i see this section: Memory installed (ram) : 4,00 gb (2,30gb usable) Why only 2,30 gb usable ? In Windows 7 32bit the maximum size is not 3,00gb ? see file attached, please (4 Replies)
Discussion started by: nash83
4 Replies
directio(3C)						   Standard C Library Functions 					      directio(3C)

NAME
directio - provide advice to file system SYNOPSIS
#include <sys/types.h> #include <sys/fcntl.h> int directio(int fildes, int advice); DESCRIPTION
The directio() function provides advice to the system about the expected behavior of the application when accessing the data in the file associated with the open file descriptor fildes. The system uses this information to help optimize accesses to the file's data. The direc- tio() function has no effect on the semantics of the other operations on the data, though it may affect the performance of other opera- tions. The advice argument is kept per file; the last caller of directio() sets the advice for all applications using the file associated with fildes. Values for advice are defined in <sys/fcntl.h>. DIRECTIO_OFF Applications get the default system behavior when accessing file data. When an application reads data from a file, the data is first cached in system memory and then copied into the applica- tion's buffer (see read(2)). If the system detects that the application is reading sequentially from a file, the system will asynchronously "read ahead" from the file into system memory so the data is immediately available for the next read(2) operation. When an application writes data into a file, the data is first cached in system memory and is written to the device at a later time (see write(2)). When possible, the system increases the performance of write(2) operations by cacheing the data in memory pages. The data is copied into system memory and the write(2) operation returns immediately to the application. The data is later written asynchronously to the device. When possible, the cached data is "clustered" into large chunks and written to the device in a single write operation. The system behavior for DIRECTIO_OFF can change without notice. DIRECTIO_ON The system behaves as though the application is not going to reuse the file data in the near future. In other words, the file data is not cached in the system's memory pages. When possible, data is read or written directly between the application's memory and the device when the data is accessed with read(2) and write(2) operations. When such transfers are not possible, the system switches back to the default behav- ior, but just for that operation. In general, the transfer is possible when the application's buffer is aligned on a two- byte (short) boundary, the offset into the file is on a device sector boundary, and the size of the operation is a multiple of device sectors. This advisory is ignored while the file associated with fildes is mapped (see mmap(2)). The system behavior for DIRECTIO_ON can change without notice. RETURN VALUES
Upon successful completion, directio() returns 0. Otherwise, it returns -1 and sets errno to indicate the error. ERRORS
The directio() function will fail if: EBADF The fildes argument is not a valid open file descriptor. ENOTTY The fildes argument is not associated with a file system that accepts advisory functions. EINVAL The value in advice is invalid. USAGE
Small sequential I/O generally performs best with DIRECTIO_OFF. Large sequential I/O generally performs best with DIRECTIO_ON, except when a file is sparse or is being extended and is opened with O_SYNC or O_DSYNC (see open(2)). The directio() function is supported for the NFS and UFS file system types (see fstyp(1M)). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
fstyp(1M), mmap(2), open(2), read(2), write(2), fcntl.h(3HEAD), attributes(5) WARNINGS
Switching between DIRECTIO_OFF and DIRECTIO_ON can slow the system because each switch to DIRECTIO_ON might entail flushing the file's data from the system's memory. SunOS 5.11 9 Apr 2003 directio(3C)
All times are GMT -4. The time now is 05:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy