Sponsored Content
Top Forums UNIX for Advanced & Expert Users Memory fragmentation in a Linux settop box Post 302917555 by achenle on Wednesday 17th of September 2014 12:44:43 PM
Old 09-17-2014
That depends on how you're doing your IO operations. How are your apps coded to do read and/or stream your files? Do you have control over your application IO? What filesystem(s) are you using for data?

Assuming you're streaming video files without much random searching, you should be using direct IO and bypassing the cache since it's extremely unlikely that the proper file data will be cached when you do any searching.

Direct IO will be faster and it won't fragment memory because you won't be using the page cache.

Caching of file data only helps when data can be held in memory long enough to allow multiple reads of the same data, or when write operations are small and/or slow enough to be effectively coalesced into a smaller number of write operations. Streaming or copying large files fits neither of those criteria.
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Memory usage in the box

Hello: Environment is: Oracle 817 on IBM RS/6000 AIX 433 I have 4GB RAM on the box and Page/Swap is about the same. Presently I am using close to 1GB of RAM towards 5 instances of ORACLE production environments. How can I know, how much of memory/RAM is used for : Oracle Processes , I... (2 Replies)
Discussion started by: ST2000
2 Replies

2. UNIX for Dummies Questions & Answers

Fragmentation command in linux?

Hi, Please let me know more details on fragmentation in redhat linux and command to check fragmented files? Thanks, Bache Gowda (2 Replies)
Discussion started by: bache_gowda
2 Replies

3. Shell Programming and Scripting

Script to Reboot a linux box from a windows box

HI All, I need a script to reboot a linux box from a windows box. The script needs to run automatically whenever a sitescope alerts with an error message. Have searched for this in the forums, but could not get something relative. Pls. let me know the various alternatives we have to do... (2 Replies)
Discussion started by: Crazy_murli
2 Replies

4. HP-UX

help me decipher how much memory on my box

hi, if I do top, I get Memory: 19277012K (5868296K) real, 33860312K (11294208K) virtual, 795392K free If I do swapinfo -tm I get: % swapinfo -tm Mb Mb Mb PCT TYPE AVAIL USED FREE USED dev 16384 0 16383 0% dev ... (3 Replies)
Discussion started by: JamesByars
3 Replies

5. Linux

my box can't see full memory

Hi I'be recently installed Virtouzzo on Centos 5 on 16GB box , but the system could only see 4 GB of RAM, I installed the package kernel-PAE, but the virtuozzo kernel still can't see the full memory. even the kernel system can see 16GB of RAM is there any idea bout that ? Thanks (2 Replies)
Discussion started by: Raied
2 Replies

6. Solaris

Memory of box

I have certain questions. 1) How can i see the memory of the unix box. 2) How can i see the size of the database on the box 3)can anyone suggest an article or tutorial that explains the concept of file systems and mount point in UNIX. 4)How can i see the dblink on the server I... (5 Replies)
Discussion started by: asalman.qazi
5 Replies

7. Solaris

Memory issue on solaris10 box

my system has 128G of installed memory. top, vmstat shows the system has just over 10G of free memory on the system. but as per prstat o/p the usage is just 50-55G is there anyway i can find which process/zone is using more memory ? System has 3 zones and all running application servers. ... (1 Reply)
Discussion started by: fugitive
1 Replies

8. UNIX for Dummies Questions & Answers

Mounting Linux box to Linux box

Hi, I've been able to mount my linux box to a windows machine, but I can't seem to mount my linux box to another linux box I have. (I know I could scp, but for other reasons I need to do it this way) Samba is installed. Here is an example where I mount to a Win machine.--> works fine mount... (12 Replies)
Discussion started by: jdilts
12 Replies

9. Red Hat

How to access redhat Linux box graphically from windows box?

Hi I have a linux box and need to access from windows graphically # uname -a Linux pc-l416116 2.6.18-155.el5 #1 SMP Fri Jun 19 17:06:47 EDT 2009 i686 i686 i386 GNU/Linux What components do I need to install on Linux and windows to do that? TIA (6 Replies)
Discussion started by: magnus29
6 Replies

10. How to Post in the The UNIX and Linux Forums

Copying , renaming the file from windox box and ftp to Linux box

Hello my dear friends, Two file are auto generated from mon - fri at different directories on same windows box.Every day i have to copy the file, rename it (specific name)and ftp it to linux box specified directory. is it possible to automate this process,If yes this has to be done from windows... (1 Reply)
Discussion started by: umesh yadav
1 Replies
mb(9r)																	    mb(9r)

NAME
mb - General: Performs a memory barrier SYNOPSIS
void mb( void ); ARGUMENTS
None DESCRIPTION
The Alpha architecture does not guarantee read/write ordering. That is, the memory subsystem is free to complete read and write operations in any order that is optimal, without regard for the order in which they were issued. Read/write ordering is not the same as cache coherency, which is handled separately and is not an issue. The Alpha architecture also contains a write buffer (as do many high-perfor- mance RISC CPUs, including the MIPS R3000). This write buffer can coalesce multiple writes to identical or adjacent addresses into a single write, effectively losing earlier write requests. Similarly, multiple reads to the same identical or adjacent addresses can be coalesced into a single read. This coalescing has implications for multiprocessor systems, as well as systems with off-board I/O or DMA engines that can read or modify memory asynchronously or that can require multiple writes to actually issue multiple data items. The mb (memory barrier) routine guarantees ordering of operations. The mb routine is derived from the MB instruction, which is described in the Alpha Architecture Reference Manual. The mb routine is a superset of the wbflush routine that ULTRIX drivers use. For compatibility, wbflush is aliased to mb on Tru64 UNIX Alpha systems. You call mb in a device driver under the following circumstances: To force a barrier between load/store operations After the CPU has pre- pared a data buffer in memory and before the device driver tries to perform a DMA out of the buffer Before attempting to read any device CSRs after taking a device interrupt Between writes Device drivers and the operating system are the primary users of the mb routine. However, some user programs, such as a graphics program that directly maps the frame buffer and manipulates registers, might need to call mb. The operating system does not provide a C library routine for mb. User programs that require use of mb should use the following asm construct: #include <c_asm.h> asm ("mb"); NOTES
In most situations that would require a cache flush on other CPU architectures, you should call the mb routine on Tru64 UNIX Alpha systems. The reason is not that mb is equivalent to a cache flush (as it is not). Rather, a common reason for doing a cache flush is to make data that the host CPU wrote available in main memory for access by the DMA device or to access from the host CPU data that was put in main mem- ory by a DMA device. In each case, on an Alpha CPU you should use a memory barrier to synchronize with that event. One example of using mb occurs with an Ethernet network controller. Each Ethernet network controller has a unique Ethernet hardware address that is typically contained in a ROM on the Ethernet controller board. The Ethernet hardware address is a multibyte sequence typically con- sisting of at least 10 bytes. This multibyte Ethernet hardware address is frequently read from the controller hardware by the driver's probe routine by issuing a sequence of reads to the same controller register. Each successive read returns the next byte of the Ethernet hardware address. In such instances, a call to mb should be inserted between each of these read operations to ensure that successive read operations are not coalesced into fewer actual reads as seen by the Ethernet controller. RETURN VALUES
None mb(9r)
All times are GMT -4. The time now is 02:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy