Archive for the tag 'memory'

SBDavid

Shared Memory

Shared Memory?

Shared memory (SHM) is another method of interprocess communication (IPC) whereby 2 or more processes share a single chunk of memory to communicate. The shared memory system can also be used to set permissions on memory, allowing for things like malloc debuggers to be written.

Types of Shared memory available

Basically there are two different types of shared memory available for most flavors of UNIX. As you may have guessed, each of the two orignal ancestors of modern UNIX have their own implementation, altough almost all modern UNIX flavors implement both. The names of the respective implementations are System V IPC, and BSD mmap.

SBDavid

Increasing PHP Allowed memory size

Some times we get the following errors Fatal error: Allowed memory size of 123456 bytes exhausted

Php is setup is to limit memory usage per process. If we require more, this limit can be increased.

Edit

/usr/local/lib/php.ini

and set:

memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

to a higher value, like 20M. Save, exit, then restart apache.

Source: http://directadmin.com/

SBDavid

Resolving high MySQL memory usage.

On RHEL uses a memory efficient /etc/my.cnf file. If you install MySQL on a Debian server, edit the key_buffer_size setting in /etc/mysql/my.cnf. A small value like 2M often works well. For an ultra-tiny setup add or change the follow entries to the mysqld section:

# if your are not using the innodb table manager, then just skip it to save some memory
#skip-innodb
innodb_buffer_pool_size = 16k
key_buffer_size = 16k
myisam_sort_buffer_size = 16k
query_cache_size = 1M

« Prev