I'm using Solaris (Solaris 10 5/08 s10x_u5wos_10 X86) to run a jboss application.
root#dev3-be3:/proc/17197$ ps -ef | grep java
root 24685 24670 2 12:13:46 pts/10 225:54 java -Dprogram.name=run_with_profiler.sh -server -Xdebug -Xnoagent -Xrunjdwp:tr
root#dev3-be3:/proc/24685$ du -sh * | grep G
1.0G as
18G fd
root#dev3-be3:/proc/24685$
root#dev3-be3:/proc/24685$ prstat | grep 24685
24685 root 1041M 991M cpu0 0 0 4:01:35 51% java/200
root#dev3-be3:/proc/24685$ df -k
Filesystem kbytes used avail capacity Mounted on
/ 124960305 110368903 13341799 90% /
/dev 124960305 110368903 13341799 90% /dev
/export/home 124960305 110368903 13341799 90% /export/home
/lib 124960305 110368903 13341799 90% /lib
/opt 124960305 110368903 13341799 90% /opt
/platform 124960305 110368903 13341799 90% /platform
/sbin 124960305 110368903 13341799 90% /sbin
/usr 124960305 110368903 13341799 90% /usr
/usr/local 124960305 110368903 13341799 90% /usr/local
proc 0 0 0 0% /proc
ctfs 0 0 0 0% /system/contract
mnttab 0 0 0 0% /etc/mnttab
objfs 0 0 0 0% /system/object
swap 6115848 272 6115576 1% /etc/svc/volatile
/usr/lib/libc/libc_hwcap1.so.1
124960305 110368903 13341799 90% /lib/libc.so.1
fd 0 0 0 0% /dev/fd
swap 6132272 16696 6115576 1% /tmp
swap 6115588 12 6115576 1% /var/run
192.168.150.32:/sftp 461928730 38771266 423157464 9% /sftp
root#dev3-be3:/proc/24685$
Why this /proc/pid/fd has high physical memory? This gets cleared after shutting down server.
Use ps or prstat to figure out how much memory a process is using. Using du on /proc pseudo file system is at best dubious.
Running 'du' on /proc (which is a virtual filesystem) is nonsensical.
There is a very good description of /proc found in its manpage, proc(4).
If your real question is "why is my java application using so much memory?"
then you are better off check the manpages to see what effect the profiler
has on memory usage. You should also check what version of java you're using
(memory usage has improved greatly in later releases). It's probably worthwhile
looking into the heap, too (see pmap).
Then you should ask your developers what they're doing and whether it's all
necessary.
Related
Working in PhpStorm 2021 I got error of lacking memory in IDE in my Kubuntu 20 (I installed it 3-4 months ago). I ignored it but after restarting I failed to run the OS.
$ /opt/PhpStorm-2021.1.4/PhpStorm-211.7628.25/bin/phpstorm.sh
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size
I cleared all directories inside of /home/user/.cache/JetBrains as I supposed that my cache raised to big size so I cleared space in root of my OS.
I upgraded my OS with the following command:
sudo apt-get update
sudo apt-get upgrade
but after restarting I still got the same error.
I have in my OS:
$ free
total used free shared buff/cache available
Mem: 8067380 1399884 4747912 198804 1919584 6202076
Swap: 2104476 0 2104476
$ lsb_release -d; uname -r; uname -i
Description: Ubuntu 20.04.3 LTS
5.11.0-37-generic
x86_64
$ df -HT
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 4.1G 0 4.1G 0% /dev
tmpfs tmpfs 827M 2.1M 825M 1% /run
/dev/sdb2 ext4 53G 28G 23G 55% / // I HAVE A LOT OF FREE SPACE
tmpfs tmpfs 4.2G 0 4.2G 0% /dev/shm
tmpfs tmpfs 5.3M 4.1k 5.3M 1% /run/lock
tmpfs tmpfs 4.2G 0 4.2G 0% /sys/fs/cgroup
/dev/sdb7 ext4 30G 13G 16G 44% /var
/dev/sdb1 ext4 339M 208M 106M 67% /boot
/dev/loop0 squashfs 155M 155M 0 100% /snap/chromium/1864
/dev/sdb8 fuseblk 399G 151G 248G 38% /mnt/_work_sdb8
/dev/loop2 squashfs 59M 59M 0 100% /snap/core18/2253
/dev/loop1 squashfs 140M 140M 0 100% /snap/chromium/1878
/dev/loop4 squashfs 261M 261M 0 100% /snap/gnome-3-38-2004/87
/dev/loop7 squashfs 66M 66M 0 100% /snap/core20/1328
/dev/loop3 squashfs 59M 59M 0 100% /snap/core18/2284
/dev/loop6 squashfs 173M 173M 0 100% /snap/gnome-3-28-1804/161
/dev/loop5 squashfs 132k 132k 0 100% /snap/bare/5
/dev/loop8 squashfs 69M 69M 0 100% /snap/gtk-common-themes/1515
/dev/loop9 squashfs 69M 69M 0 100% /snap/gtk-common-themes/1519
/dev/loop10 squashfs 46M 46M 0 100% /snap/snapd/14295
/dev/loop11 squashfs 66M 66M 0 100% /snap/core20/1270
/dev/loop12 squashfs 46M 46M 0 100% /snap/snapd/14549
/dev/sda6 fuseblk 237G 122G 115G 52% /mnt/Work_sda6
/dev/sda1 fuseblk 65G 58G 7.2G 89% /mnt/Win_sda1
/dev/sda8 fuseblk 628G 626G 2.7G 100% /mnt/Media_sda8
tmpfs tmpfs 827M 17k 827M 1% /run/user/1000
I found file /home/user/.config/JetBrains/PhpStorm2021.2/phpstorm64.vmoptions
-Xmx984m
-Xms128m
-XX:ReservedCodeCacheSize=512m
-XX:+UseG1GC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-ea
-Dsun.io.useCanonCaches=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
-Dsun.tools.attach.tmp.only=true
Has it relative options? I tried to modify it (I googled some refs in net) :
-Xms5096m
-Xmx4096m
-XX:NewSize=1024m
-XX:MaxNewSize=1512m
-XX:ReservedCodeCacheSize=512m
-XX:+UseG1GC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-ea
-Dsun.io.useCanonCaches=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
-Dsun.tools.attach.tmp.only=true
Restated OS and the same error.
I have a SSD (sdb and on Linux partitions are located on it) and HDD (sda) on my laptop and I do not use any virtual machines...
What could raise this error and how it can be fixed ?
I'm trying to mysql, but I'm receiving this error:
sudo /etc/init.d/apache2 start
* Starting web server apache2 *
ubuntu#ip-172-31-19-47:/var/www/html/anunciolocal$ sudo /etc/init.d/mysql start
* /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!
When I checked my memory:
ubuntu#ip-172-31-19-47:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 996M 12K 996M 1% /dev
tmpfs 201M 344K 200M 1% /run
/dev/xvda1 16G 15G 307M 98% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 1001M 0 1001M 0% /run/shm
none 100M 0 100M 0% /run/user
overflow 1.0M 992K 32K 97% /tmp
How do I solve it?
Try running it this way
sudo service mysql stop
sudo service mysql start
/etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!
this is why you cant start mysql
please clear /dev/xvda1 the disk has no enough space
Good day,
I have been looking through a lot of documentation and nothing really appears to confirm how to expand the disk size of the the LXC containers that I am spinning up..
Here is what I have tried so far,
I warn you the items below look unrelated, but confirm my thoughts that it is and should be possible to alter the disk size.
LXC how to change network adapters
I followed the document with hopes that I could modify the size of the / and judging from this question it looks like it is possible...
https://askubuntu.com/questions/779609/lxd-container-disk-and-block-i-o-limits-edit-its-a-zfs-pool-limit
I tried doing this and It does write to the config , but the configuration never takes.
lxc profile device set tuleapprofile root size 20GB
lxc launch -p tuleapprofile images:centos/6/amd64 tuleap
TULEAP PROFILE
lxc profile show tuleapprofile
config: {}
description: Default LXD profile
devices:
eth0:
name: eth0
nictype: bridged
parent: lxdbr0
type: nic
root:
path: /
pool: default
size: 20GB
type: disk
name: tuleapprofile
used_by: []
df -h
8.9G 188M 8.8G 3% /
none 492K 0 492K 0% /dev
udev 3.9G 0 3.9G 0% /dev/full
udev 3.9G 0 3.9G 0% /dev/null
udev 3.9G 0 3.9G 0% /dev/random
udev 3.9G 0 3.9G 0% /dev/tty
udev 3.9G 0 3.9G 0% /dev/urandom
udev 3.9G 0 3.9G 0% /dev/zero
udev 3.9G 0 3.9G 0% /dev/fuse
udev 3.9G 0 3.9G 0% /dev/net/tun
tmpfs 100K 0 100K 0% /dev/lxd
tmpfs 100K 0 100K 0% /dev/.lxd-mounts
tmpfs 3.9G 0 3.9G 0% /dev/shm
All I want is to have / in the LXC containers be larger (by 20 G ) so I can install what I need. how can I do this. The method doesn't really matter , but I would like to have this.
Thanks
My system is using Ubuntu with mysql database:
I have a complex mysql select query to run.
mysql -u root -p myDB < query.sql
But when I try to run it it always gives me:
ERROR 3 (HY000) at line 1: Error writing file
'/mnt/disk/tmp/MY0Wy7vA' (Errcode: 28 - No space left on device)
I have 11 GB free on disk and while the query is running, I keep track of it using
df -h
and
df -hi
to keep track of inodes
and I don't see any decrease in disk space while the query is running. All the time there is always 11 GB free on disk where the tmp folder is located.
This is the output of df -h:
ubuntu#ip-10-0-0-177:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 799M 57M 742M 8% /run
/dev/xvda1 30G 24G 5.4G 82% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/xvdf1 50G 39G 11G 80% /mnt/disk
tmpfs 799M 0 799M 0% /run/user/1000
This is the output of df -aTh:
Filesystem Type Size Used Avail Use% Mounted on
/dev/xvdf1 ext4 50G 39G 11G 80% /mnt/disk
Take a look at the part of the error that indicate it’s actually writing to /tmp (see below)
: Error writing file '/mnt/disk/tmp/MY0Wy7vA
In some Linux distributions, /tmp is mounted as a tmpfs (ramdisk), so even if your disk has plenty of space you can get a "no space" error if you try to write too much there.
To investigate about the mount, try
$ cat /proc/mounts
OR
$ cat /proc/self/mounts
Or better yet
df - aTh
df -h /tmp
To see hidden ones, try
du -sc * .[^.]* | sort -n
Among other things you can try making MySQL use a different temp directory, or to not use tmpfs for /tmp
If TMPDIR is not set in my.cnf, MySQL uses the system default which is usually /tmp
You can change the MySQL tmp dir as the following suggests:
Changing the tmp folder of mysql
Credits ::
https://github.com/LogBlock/LogBlock/issues/540
On the Gitlab Click2Deploy in Google Compute engine, there is a Boot Disk Size field that defaults to 100gb.
However df -h reveals that the boot disk is partitioned to 10gb.
Is this normal, or a bug?
[lol#gitlab-ydzp ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 10G 2.4G 7.7G 24% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 8.2M 1.8G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
The image used to create the boot disk has a partition size of 10G. There is another 90G available in your disk as unpartitioned space. Please follow the steps described in the link below to repartition your disk: Repartitioning a root persistent disk