New answers tagged

0

Below stuff may help : var=$(pgrep process_name_here); top -b -p "$var" | awk -v var=$var '$1~var{print $10}' You might even think of writing a script and passing the process name as argument Note: This solution will not work if you change the default layout for the top command. In that case you need to replace $10 with appropriate field number


1

The physmem value from the system_pages statistics will give you the number of pages the OS sees. You need to multiply this number by the default page size which can be 4K or 8K depending on your architecture: $ kstat -n system_pages -p -s physmem | nawk -v pagesize=$(pagesize) '{print $2*pagesize/1024/1024 "MB"}' 4017.64MB Note that this might not ...


0

There's also lgrpinfo (man page): Description lgrpinfo prints information about the locality group (lgroup) hierarchy and its contents. An lgroup represents the set of CPU and memory-like hardware devices that are at most some distance (latency) apart from each other. All lgroups in the system are identified by a unique integer called an ...


0

Cache. A good summary at http://www.linuxatemyram.com/. Linux is borrowing unused memory for disk caching. This makes it looks like you are low on memory, but you are not! Everything is fine! To clear the caches use this command, as root, and then observe resulting memory usage. echo 3 > /proc/sys/vm/drop_caches


0

You might be able to use: echo "::memstat" |mdb -k


0

Do you have either swap or mdb? Maybe kstat :::physmem, which should give you the number of pages. (8K on SPARC, 4K on x86 in most situations)


0

This is an opinion based question, but truth be told, to talk about performance is such a broad topic that unless you know exactly what you want and exactly what you are experiencing it is hard to advise on something. Having said that: Check this page The author is experienced on performance and was a kernel engineer for Sun. The method he describes is ...


0

This is mainly an opinion answer which depends on my past experiences and nothing else. I am not a programmer and Solaris (any version) is my least favorite UNIX flavor. I try to get away with doing as little as possible on Solaris system. Having said that, I worked with T4 systems in the recent past and the CPU is a work horse. It takes a lot more than ...


2

If you look at the kernel's inode source code, you can see that the ihash_entries is set at the kernel level only. There is no user or process level considerations at all. Adding those could drastically decrease performance which would be counter productive. It would also imply keeping track of all processes that used the cached entries, therefore ...


0

I'm using the below script, which works great. It uses cgroups through cgmanager. Name this script limitmem and put it in your $PATH and you can use it like limitmem 100M bash. This will limit both memory and swap usage. To limit just memory remove the line with memory.memsw.limit_in_bytes. #!/bin/sh set -eu if [ "$#" -lt 2 ] then echo Usage: ...


0

Digging up a really old question here - but I had this same issue. For me the problem ended up being MYSQLD running. To started I noticed my healthchecks started failing after switching to a t1-nano ubuntu instance in ec2 (1 core 512 ram). At the time I thought this would be fine b/c I was only running nginx with a static health check, a 301 entry and a ...


0

in /etc/sysctl.conf increase vm.swappiness=50


1

mlockall() is a standard C function that locks all of a currently mapped process memory to RAM. One simple way to use it from a JVM is to call it through JNA (Java Native Access). This is what does the mlockall agent available here.


0

ClamAV holds the search strings using the classic string (Boyer Moore) and regular expression (Aho Corasick) algorithms. Being algorithms from the 1970s they are extemely memory efficient. The problem is the huge number of virus signatures. This leads to the algorithms' datastructures growing quite large. You can't send those datastructures to swap, as ...


0

So after almost two months of puzzling over this question, I decided to ask around how to enable that vm.zone_reclaim_mode sysctl option and play a little with different values, and lo and behold -- problem solved. Solution: Enable CONFIG_NUMA on my kernel's configuration and rebuild it. Put vm.zone_reclaim_mode = 7 on sysctl.conf Now my system can ...


1

Those figures show a write-bound process, so the cache tuning suggested by OpenNMS won't help. However it could help if you sacrificed durability. If your OpenNMS dies, it doesn't really matter if the database shows it dying a few seconds earlier. (This is unlike e.g. an email server, where clients are relying on at-least-once semantics). You could lose ...


1

Try rrenice from Debian's pslist package, this command sets the priority of 'opennms' (and all its descendents) to the lowest possible setting: sudo rrenice 19 opennms Or that's not available, use plain renice: sudo renice -n 19 -p $(pidof opennms) For disk hog programs, use ionice: ionice -c3 -p $(pidof opennms) BTW: that opennms process seems to ...


1

iotop is your friend (assuming your server runs Linux).


0

If top is already running, press o . Above the data, a prompt will appear: primary key [xxxxx]: Where xxxxx is the current sorting key. Type the name of the column by which you want to sort. If a column name contains "%" or "#", omit the character. For %CPU, just type "cpu".


4

Processes are managed by the kernel. The kernel doesn't care how the programmer allocates variables. All it knows is that certain blocks of memory belong to the process. The C runtime matches C memory management features to kernel features: automatic variables go into a memory block called “stack” and dynamic storage (malloc and friends) go into a memory ...


1

Whenever a process exits either gracefully or through SIGINT,SIGTERM,SIGKILL etc, the exit system call is invoked. Part of the exit call's job is to reclaim any resources that were being used by the process. Essentially, whenever the OS sees an exit status (success or not) being returned, two things happen: SIGCHLD is sent to the parent process to let the ...


-2

If certain bits of memory need to be zeroed (e.g. a password or private key), then you'll need a signal handler that calls memset(3) or whatever prior to the process showing itself out the door. See also libsodium, which has some handy and portable routines relevant to this: sodium_mlock, sodium_memzero, etc. Always zeroing all memory after every process ...


4

free is provided by procps-ng; Debian 8 has version 3.3.9, which uses the old style with a separate line for buffers/cache, while Gentoo and presumably RHEL 7.x have version 3.3.10 or later which uses the new style. You can see the reasoning behind the change in the corresponding commit message. If you really want the old-style output you can run an older ...



Top 50 recent answers are included