Tag Info

Hot answers tagged

20

There is no need to do this, the kernel manages RAM efficiently by using it for caches and buffers if it is not needed by processes. If processes request more RAM the kernel will deallocate caches and buffers if necessary to satisfy the request. This ServerFault answer explains how to interpret the memory usage reported by free.


8

You don't have to do all that, you can just mount /tmp as tmpfs by using a line like the following in /etc/fstab: tmpfs /tmp tmpfs mode=1777,nosuid,nodev 0 0 You can also do it live (but bear in mind stuff that is currently in /tmp on your current filesystem will not be able to be accessed except through the inode and currently open file descriptors, so ...


8

First, if your BIOS/UEFI does not detect correctly your RAM, then your OS won't do any better. There's no need to go any further if your BIOS display incorrect information about your setup. => You probably have at least an hardware problem. EDIT: From your dmesg | grep memory, it seems that you have in fact an hardware problem, located in your embedded ...


8

Linux is very efficient in using RAM. There is little surprise that you see little if any speedup with tmpfs. The largest pieces to read into memory (and thus able to slow the process down) are the tools (compiler, assembler, linker), and in a longish make they will be loaded into memory at startup and never leave it. What is left is reading in source (the ...


8

You don't need to do so. There are two possiblities, if there is something in the cache: it is needed again it is not needed again In the first case, it is better if it remains in RAM as long as possible, which means: another process needs the RAM. Then it is discarded automatically without your intervention. In the second case, it doesn't disturb. ...


6

No problem in that. Linux is borrowing the RAM for caching. This is desirable (RAM is faster than disk) and absolutely normal behaviour. From that link: Why does top and free say all my ram is used if it isn't? This is just a misunderstanding of terms. Both you and Linux agree that memory taken by applications is "used", while memory that isn't ...


6

Check out this How do I detect the RAM memory chip specification from within a Linux machine question. This tool might help: http://www.cyberciti.biz/faq/check-ram-speed-linux/ $ sudo dmidecode --type 17 | more Sample output: # dmidecode 2.9 SMBIOS 2.4 present. Handle 0x0018, DMI type 17, 27 bytes Memory Device Array Handle: 0x0017 Error ...


5

Pre-loading a movie to memory probably only matters for network streams or if you don't want your disk respinning. In any case you can try increasing cache size in your media player. With mplayer it can be achieved with following command. mplayer -cache <HUGE_NUMBER_IN_KILOBYTES> <VIDEO_FILE> Usually the problem with slow/choppy video is in ...


5

Search /var/log/dmesg for memory map (grep for 'e820') and count how many memory is reported there as usable. This is what BIOS tells to loaded OS for memory. (This is correct only for old-styled boot. I don't know how the memory is reported if EFI-styled boot is used, but I guess there is similar report.) Also, reporting 16GB by BIOS while 32GB is ...


4

There's a suggestion here. There's also a kernel patch called badRAM but not, I think, for anything after 2.6.28. The blog suggestion regarding memmap looks to be derived from a note included in the kernel source documentation, src/Documentation/bad_memory.txt; this note is still in the (currently most recent) 3.7.10 source as are references to the memmap ...


4

Yes, it is a strong solution, but powerfull! Making r/o useable You have to mount some directories in rw, like /var, /etc and maybe /home. This could by done using aufs or unionfs. I like this another way, using /dev/shm and mount --bind: cp -a /var /dev/shm/ mount --bind /dev/shm/var /var You could before, move all directories who have not to change in ...


4

Yes it is possible. You can first mount a tmpfs partition and then play your video file from there. I mount my /tmp partition in RAM since the contents do not need to be preserved between reboots and there are definite speed benefits. Here is my entry in my /etc/fstab which creates it on each boot: tmpfs /tmp tmpfs ...


4

32-bit processes can only allocate up to 1, 2, 3, or about 4GB, depending on which memory split was chosen when the 32-bit kernel was built. 32-bit processes on a 64-bit kernel can allocate about 4GB. 64-bit processes on a 64-bit x86-64 kernel can allocate up to 128TiB.


4

The problem is that the maximum size of a ramdisk, more specifically of size of memory that can be accessed via the ramdisk driver is configured at compiletime, can be overwritten at boottime, but remains fixed once the kernel is loaded into memory. The default value is probably measured in Megabytes. If I recall correctly the memory for a ramdisk is ...


3

A complete re-write of my previous post. Got a bit curious and checked out further. In short: the reason for the difference is that openSUSE uses a patched version of top and free that adds some extra values to `cached'. A) Standard version top, free, htop, ...: Usage is calculated by reading data from /proc/meminfo: E.g.: #free: Row Column | ...


3

A 32-bit process has a 32-bit address space, by definition: “32-bit” means that memory addresses in the process are 32 bits wide, and if you have 232 distinct addresses you can address at most 232 bytes (4GB). A 32-bit Linux kernel can only execute 32-bit processes. Depending on the kernel compilation options, each process can only allocate 1GB, 2GB or 3GB ...


2

A simple cat movie.mkv >/dev/null should do the trick. The reason is that the file is entirely read and files recently read are kept in the file cache by the operating system, which happens to be in RAM. However, you have no guarantee how long the file remains in memory, that depends on several factors: movie size memory size available memory


2

Answering precisely to the question: Is there a way to speed things up at boot time?. Yes. Welcome to systemd, this is available on RHEL6 onwards, Fedora 15,16 onwards, CentOS 6 onwards. In other worlds of Linux like Ubuntu -- you would have upstart In other world of Unix like Solaris, BSD, MacOSx: you have SMF Both attempt to solve the nature of the ...


2

Basically, you want a daemon that monitors the free memory, and if it falls below a given threshold, it chooses some process and kills them to free up some memory. while (true) { size_t free_memory = get_free_memory(); if (free_memory < free_memory_threshold) { pid_t pid = choose_a_process_to_kill(); kill(pid, SIGTERM); } } ...


2

My processor is using a big part of my RAM memory as cache and I want to clean it up because of that; will it prejudice something? Yes, much of what is currently in cache will need to fetched from disk. Access from disk used to be 100 of times slower than memory access. Memory speed has increased, much faster than disk speed, so it is likely 10s of ...


2

use ramfs instead of tmpfs. ramfs is a ramdisk (no swap) tmpfs can be both in your /etc/fstab: none /path/to/location ramfs defaults,size=512M 0 0 edit the size parameter to whatever you like but be careful not to exceed your actual amount of ram. NOTE: the use of a ramfs instead of tmpfs is not something i would recommend. you will find ...


2

memmap There is this tutorial titled: Bad Memory HowTo which discusses disabling memory via the kernel using the memmap argument to the kernel. According to the howto you have 2 options when it comes to memmap: Turn off everything after the bad memory - (mem=###M option) Turn off just the memory around the bad memory - (memmap=#M$###M option) With the ...


2

You can use the memmap kernel command line option. Here's the relevant bit of the documentation: memmap=nn[KMG]$ss[KMG] [KNL,ACPI] Mark specific memory as reserved. Region of memory to be used, from ss to ss+nn. Example: Exclude memory from 0x18690000-0x1869ffff memmap=64K$0x18690000 or memmap=0x10000$0x18690000 ...


2

The package hardinfo (http://hardinfo.berlios.de/HomePage) is a pretty decent system benchmarker with a nice GUI. The simplest way to compare the two would be to benchmark one save the results and then compare it to your benchmarking of the other. EDIT: Depending on your distro, you may already have hardinfo installed, for example on Lubuntu it is called ...


1

Most of the conversions can be handled by ffmpeg which comes with a amazing number of codecs. To convert your file, try the following command: ffmpeg -i file.rma file.avi Useful information about a file can be retrieved using the file command. Remember that avi or rma are just containers, so two avi files may not use the same encoding for audio or video. ...


1

What are your real numbers, versus the simplified representation above? I'd argue that you shouldn't overcommit your RAM to that degree. Obviously, more RAM should be an option. Have you considered leveraging an SSD and enabling the Swap to SSD/host cache feature?


1

One should not mix up virtual memory and physical volatile memory. The former is CPU architecture specific and will be mapped to volatile and non-volatile memory. The latter, aka RAM, should be independent of CPU architecture from the kernel point of view. Today's AMD and Intel x86_64 implementation only support 48 bit of addressable virtual memory. Which ...



Only top voted, non community-wiki answers of a minimum length are eligible