Wednesday, 28 April 2010

MEMORY_TARGET not supported on this system

MEMORY_TARGET not supported on this systemOracle9i introduced pga_aggregate_target, you can adjust the PGA automatically; Oracle10 introduction sga_target, can automatically adjust to the SGA. Oracle11g then the two parts are integrated, the introduction of memory_target, can automatically adjust all of the memory, which is newly introduced automatic memory management features. SQL> alter system set memory_target = 200m scope = spfile;

Set memory_target parameters, in fact Oracle will automatically set and adjust the two double-underscore at the beginning of the implicit parameter to the allocation of SGA and PGA memory, which, and Oracle10g is automatically set sga_target are assigned db_cache_size and shared_pool_size mechanism is the same as SQL> select a.ksppinm name, b.ksppstvl value 2 from x $ ksppi a, x $ ksppcv b 3 where a.indx = b.indx 4 and (a.ksppinm like '% sga_target%' 5 or a.ksppinm like '% pga_aggregate_target%');

This error is a bit misleading, in fact does not mean that the platform does not support the version of AMM features, but more than the system set up memory_max_target set share memory (/ dev / shm) only. In Oracle11g for linux seems to use a new mechanism to manage the shared memory segment, rather than the traditional sys v shm had. The alert.ora can be found in a more accurate description of the error

Starting ORACLE instance (normal) WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the / dev / shm file system to be mounted for at least 314572800 bytes. / Dev / shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 209715200 and used is 0 bytes. memory_target needs larger / dev / shm

Therefore, this error there are two solutions. The first is to reduce the natural memory_max_target / memory_target. The second is to increase the / dev / shm [root @ localhost ~] # df-k / dev / shm Filesystem 1K-blocks Used Available Use% Mounted on shmfs 204800 0 204800 0% / dev / shm

Using tmpfs speed up your linux server uses virtual disks to store squid cache files and php the seesion. Fast and a lot of Oh!

By default the system will load the / dev / shm, it is the so-called tmpfs, Some say that with the ramdisk (virtual disk), but not the same. The same as the virtual disk, tmpfs can use your RAM, but it can also use your swap partition to store. And the traditional virtual disk is a block device, and the need for a sort of command mkfs can really use it, tmpfs is a file system, rather than a block device; you just install it, it can use.

tmpfs has the following advantages: 1. Dynamic file system size, 2. tmpfs Another major advantage is its lightning speed. Because a typical tmpfs file system will be fully reside in RAM, the read and write could be almost instantaneous. 3. tmpfs data not be retained after you restart, because virtual memory is volatile in nature. It is necessary to do some scripting to do, such as loading, binding operations.

Well talk about a number of major principles, we are tired of looking at it, I still talk about the application of it:)

First in the / dev / shm to build a tmp folder, and then with the actual / tmp binding

Modified to cache_dir ufs / tmp 256 16 256 The first one here, 256 that the use 256M memory, I think http://www.linuxaid.com.cn/articles/4/4 / 441672019.shtml where the method does not use the ramdisk as the direct use of tmpfs, at least every time you start do not mkfs , you can also dynamically change the size. This time, / tmp is actually the / dev / shm / tmp

Then restart about service, ok, now all of the squid cache files are saved inside inverted tmpfs file system, and soon oh.

2. For php performance optimization

For a visit to a large quantity of apache + php website may tmp will be under a lot of temporary files, such as seesion or some cache file, then you can save it to a tmpfs file.

Save seesion method is very simple as long as a modified php.ini on the list, as I have already / dev / stm / tmp and / tmp binding, it is not rewritten are also OK, as php program generated cache file, it will only change their own php program has:)

As for the tmpfs other applications, I think we may be inspired by this article will.