Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache error ? #44

Open
m-garanin opened this issue Feb 18, 2014 · 10 comments
Open

Cache error ? #44

m-garanin opened this issue Feb 18, 2014 · 10 comments

Comments

@m-garanin
Copy link

v0.6, Centos 6:
i use config where cache object set to False,
but in log i see usage cache:

..................
02:27:02 [fio](fileio_read_on_head_cb file_io_ops.c:872) [ino: 10] Remote file size: 100
02:27:02 [fio](fileio_read_on_head_cb file_io_ops.c:912) [ino: 10] MD5 sums match, using local cached file!
02:27:02 [fio](fileio_read_get_buf file_io_ops.c:824) [ino: 10] requesting [0: 100], file size: 100
02:27:02 [cmng](cache_mng_retrieve_file_buf cache_mng.c:309) [ino: 10] Read [0:100] bytes, result: OK
02:27:02 [fio](fileio_read_on_cache_cb file_io_ops.c:783) [ino: 10] Reading from cache
02:27:02 [dir_tree](dir_tree_on_buffer_read_cb dir_tree.c:1357) [ino: 10, frop: 0x1208150] file READ_cb !
02:27:02 [fuse](rfuse_read_cb rfuse.c:684) [req: 0x11d3f90] <<<<< read_cb success: YES IN buf: 100
.........

/////////////////////////////////////////////////////////////////////////
.....


-1
-1

<dir_mode type="int">-1</dir_mode>
<file_mode type="int">-1</file_mode>

<!-- time to keep directory cache (seconds) -->
<dir_cache_max_time type="uint">10</dir_cache_max_time>

<!-- time to keep file attributes cache (seconds) -->
<file_cache_max_time type="uint">10</file_cache_max_time>

<!-- set True to enable calculating MD5 sum of file content, increases CPU load -->
<md5_enabled type="boolean">True</md5_enabled>

<!-- set True to enable objects caching -->
<cache_enabled type="boolean">False</cache_enabled>

<!-- directory for storing cache objects -->
<cache_dir type="string">/tmp/riofs</cache_dir>

<!-- maximum size of cache directory (1Gb) -->
<cache_dir_max_size type="uint">1073741824</cache_dir_max_size>

<!-- maximum time of cached object, 1 min -->
<cache_object_ttl type="uint">60</cache_object_ttl>
@wizzard
Copy link
Member

wizzard commented Feb 20, 2014

Hello,
first of all, I'd like to let you know that we didn't really test RioFS with cache turning off. But as far as I remember it should work, as there aren't any additional code used (some time ago I run a number of tests with caching turned off to see how does RioFS behave, and it worked fine).

As I understand, you are confused by the log messages which mention "cache". This is ok, as we are accessing caching subsystem code (it prints "Reading from cache") and cache returns "0 bytes available" for a requested part.

@m-garanin
Copy link
Author

Hello, my use-case:

  1. A-host write "task.txt" to S3 (by RioFS)
  2. B-host read and change "task.txt".
  3. After hour, A-host read "task.txt" but always get old content of file.

Now i rewrite rio-config (and total reload\unmount RioFS):

  <dir_cache_max_time type="uint">0</dir_cache_max_time>
    <file_cache_max_time type="uint">0</file_cache_max_time>
    <md5_enabled type="boolean">False</md5_enabled>
    <cache_enabled type="boolean">False</cache_enabled>
    <cache_dir type="string">/tmp/riofs</cache_dir>
    <cache_dir_max_size type="uint">0</cache_dir_max_size>
    <cache_object_ttl type="uint">0</cache_object_ttl>

Problem dirty solved,
but in /tmp/rio-fs i always see new files "cache_mng_*" (why? i disable cache).

@wizzard
Copy link
Member

wizzard commented Feb 20, 2014

Thank you for the test case, I'll check and see how it works for me!

@tdensmore
Copy link

Is this still open? If so, can I ask about the current knowledge of the caching system?

@wizzard
Copy link
Member

wizzard commented Apr 7, 2015

I can't reproduce this issue on my side. If anyone's managed to get this error - please attach log file, so I could analyze it.

@chand8
Copy link

chand8 commented Dec 11, 2017

Hi, recently I have implemented RioFS on ubuntu 16.0.4 LTE. I have configured RIOFS as follows
'sudo riofs -o "allow_other" -o "direct_io" -c '/usr/local/etc/riofs/riofs.conf.xml' --uid=48 --gid=48 -l /var/log/riofs.log my-bucket /var/www/html/public/data'
Initially, it was working fine, but now a I am seeing errors in log file.

ERROR! [ino: 305] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 305] Failed to open file for reading! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 1525] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1525
ERROR! [ino: 998] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_998
ERROR! [ino: 1790] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1790
ERROR! [ino: 305] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 305] Failed to open file for reading! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 1525] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1525
ERROR! [ino: 998] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_998
ERROR! [ino: 1790] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1790
ERROR! [ino: 305] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 305] Failed to open file for reading! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 1525] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1525
ERROR! [ino: 998] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_998
ERROR! [ino: 1790] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1790
ERROR! [ino: 305] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 305] Failed to open file for reading! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 1525] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1525
ERROR! [ino: 998] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_998
ERROR! [ino: 305] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 305] Failed to open file for reading! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 1790] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1790
ERROR! [ino: 1525] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1525
ERROR! [ino: 998] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_998
ERROR! [ino: 305] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 305] Failed to open file for reading! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_305
ERROR! [ino: 1790] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1790
ERROR! [ino: 1525] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1525
ERROR! [ino: 998] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_998
ERROR! [ino: 1790] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1790
ERROR! [ino: 1525] Failed to create / open file for writing! Path: /tmp/cache/BdoSIvoV6b69ejy1n8sJ/cache_mng_1525

what does it mean. It is not able to create cache files on the disk ?

@wizzard
Copy link
Member

wizzard commented Dec 11, 2017

Hello,
please check if /tmp/cache/BdoSIvoV6b69ejy1n8sJ/ folder exists and has enough space to create new files.

@chand8
Copy link

chand8 commented Dec 11, 2017

yes, disk was filled. too many logs are getting generated. I have set Cache to true, and I can see couple of files in /tmp/cache folder. Do I need to manually clear the files form cache folder or RioFs will automatically clear them ?

@chand8
Copy link

chand8 commented Dec 12, 2017

My Cache directory is going off after one day and riofs is not able to create cache folder. where can I need to set permissions to make sure that cache directory gets created automatically and also sub folders.

@chand8
Copy link

chand8 commented Dec 14, 2017

@wizzard after every 24 hours, the cache directory is going off. once I restart riofs, then the folder gets created and riofs works normally. from logs I can see lots of [con: 0x1ece270].
My config file is as follows and the mount command I am using is
/usr/local/bin/riofs -o "allow_other" -o "direct_io" -c '/usr/local/etc/riofs/riofs.conf.xml' --uid=48 --gid=48 --fmode=0777 --dmode=0777 -l /var/log/riofs.log my-staging-data /var/www/application/public/data
riofs-config-file.zip
I have noticed this from last 3 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants