- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Linux-Based Community / Regional
- >
- Rhel 5 core files size increases dramatically when...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2010 01:05 PM
03-16-2010 01:05 PM
Rhel 5 core files size increases dramatically when moved
- Tags:
- sparse file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2010 01:09 PM
03-16-2010 01:09 PM
Re: Rhel 5 core files size increases dramatically when moved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2010 06:43 PM
03-16-2010 06:43 PM
Re: Rhel 5 core files size increases dramatically when moved
We need more information what/where/how?
BR,
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2010 10:34 PM
03-16-2010 10:34 PM
Re: Rhel 5 core files size increases dramatically when moved
If the size seen by "ls -l" is larger than the size seen by "du", what you're seeing is a sparse file.
Unix filesystems often have a property called "sparse files": if a file contains a long string of zero bytes, the filesystem can replace the whole string with a short mark, effectively "insert xxxxxx zero bytes here". This is effectively the grandfather of on-disk file compression schemes.
When a file is loaded, the filesystem automatically expands these to real zero bytes, so the application using the file will never see any difference.
Using the "sparse file" functionality requires that the program writing the file specifically wants to use it. When a kernel is dumping a core file to disk, the program to be dumped may have allocated large blocks of memory, but not actually used (neither read or written) much of it yet. The kernel knows where the unused portions are, and can easily use the sparse file functionality to skip over them. This will reduce the size of the core file, often significantly.
If the core file is later copied using a program that does not replicate the "sparse" property, the runs of zero bytes will be expanded to full size.
An example of a sparse file:
$ dd if=/dev/zero of=/tmp/test bs=1k seek=10000000 count=1
$ ls -lh /tmp/test
-rw-r--r-- 1 mkurkela mkurkela 9.6G 2010-03-17 08:18 /tmp/test
$ du -h /tmp/test
16K /tmp/test
A sparse file containing 9.6G of zero bytes takes up just 16K on disk. With a different filesystem type, it might take up even less disk space.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2010 04:53 PM
03-17-2010 04:53 PM
Re: Rhel 5 core files size increases dramatically when moved
A little detail would help. Perhaps the file handle is still open on these core files.
Who owns them?
Lots more data needed to help.
SEP
70 Points to Linux Olympus with a Penguin on top.
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com