Search Results

Search found 5 results on 1 pages for 'wuser'.

Page 1/1 | 1 

  • How to reduce celeryd memory consumption?

    - by Gringo Suave
    I'm using celery 2.5.1 with django on a micro ec2 instance with 613mb memory and as such have to keep memory consumption down. Currently I'm using it only for the scheduler "celery beat" as a web interface to cron, though I hope to use it for more in the future. I've noticed it is the biggest consumer of memory on my micro machine even though I have configured the number of workers to one. I don't have many other options set in settings.py: import djcelery djcelery.setup_loader() BROKER_BACKEND = 'djkombu.transport.DatabaseTransport' CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler' CELERY_RESULT_BACKEND = 'database' BROKER_POOL_LIMIT = 2 CELERYD_CONCURRENCY = 1 CELERY_DISABLE_RATE_LIMITS = True CELERYD_MAX_TASKS_PER_CHILD = 20 CELERYD_SOFT_TASK_TIME_LIMIT = 5 * 60 CELERYD_TASK_TIME_LIMIT = 6 * 60 Here's the details via top: PID USER NI CPU% VIRT SHR RES MEM% Command 1065 wuser 10 0.0 283M 4548 85m 14.3 python manage_prod.py celeryd --beat 1025 wuser 10 1.0 577M 6368 67m 11.2 python manage_prod.py celeryd --beat 1071 wuser 10 0.0 578M 2384 62m 10.6 python manage_prod.py celeryd --beat That's about 214mb of memory (and not much shared) to run a cron job occasionally. Have I done anything wrong, or can this be reduced about ten-fold somehow? ;) Update: here's my upstart config: description "Celery Daemon" start on (net-device-up and local-filesystems) stop on runlevel [016] nice 10 respawn respawn limit 5 10 chdir /home/wuser/wuser/ env CELERYD_OPTS=--concurrency=1 exec sudo -u wuser -H /usr/bin/python manage_prod.py celeryd --beat --concurrency=1 --loglevel info --logfile /var/tmp/celeryd.log Update 2: I notice there is one root process, one user child process, and two grandchildren from that. So I think it isn't a matter of duplicate startup. root 34580 1556 sudo -u wuser -H /usr/bin/python manage_prod.py celeryd wuser 577M 67548 +- python manage_prod.py celeryd --beat --concurrency=1 wuser 578M 63784 +- python manage_prod.py celeryd --beat --concurrency=1 wuser 271M 76260 +- python manage_prod.py celeryd --beat --concurrency=1

    Read the article

  • Windows XP 'graphical' analog to sudo

    - by wuser
    Is there any convinient one util? I already know about runas feature. You have to accomplish too many steps to use it: after bringing up shift menu you need to press Tab, select admin user, again tab and finally type password. Besides you can't make it 'remember' password for some time or run msi installers this way.

    Read the article

  • How to associate the ".exe" extension to be opened with Mono?

    - by wuser
    I want to asssociate the .exe file extension to Mono (don't care about wine). Apparently, when using Finder's GUI, only .app files (application bundles) can be selected. But the Mono executable (/Libraries/Frameworks/Mono.Framework/Current/bin/mono) is no such bundle. I tried some AppleScript on run this_file do shell script "mono this_file &" end run but Finder's GUI still doesn't allow to associate that with .exe's. How to associate a specific file extension to a command-line application in Mac OS X?

    Read the article

  • How to read registry correctly for multiple values in c?

    - by kampi
    Hi! I created a .dll which should work like the RunAs command. The only difference is, that it should read from registry. My problem is, that i need to reed 3 values from the registry, but i can't. It reads the first, than it fails at the second one (Password) with error code 2, which means "The system cannot find the file specified". If i query only for domain and username then it is ok, if i query only for password then it it still succeeds, but if i want to query all three then it fails. Can someone tell me, what i am doing wrong? Heres my code: HKEY hKey = 0; DWORD dwType = REG_SZ; DWORD dwBufSize = sizeof(buf); TCHAR szMsg [MAX_PATH + 32]; HANDLE handle; LPVOID lpMsgBuf; if( RegOpenKeyEx( HKEY_CURRENT_USER, TEXT("SOFTWARE\\Kampi Corporation\\RunAs!"), 0, KEY_QUERY_VALUE, &hKey ) == ERROR_SUCCESS ) { if( RegQueryValueEx( hKey, TEXT("Username"), 0, &dwType, (LPBYTE)buf, &dwBufSize ) == ERROR_SUCCESS ) { memset( szMsg, 0, sizeof( szMsg ) ); wsprintf ( szMsg, _T("%s"), buf ); mbstowcs( wuser, szMsg, 255 ); RegCloseKey( hKey ); } else { MessageBox ( pCmdInfo->hwnd, "Can not query for Username key value!", _T("RunAs!"), MB_ICONERROR ); RegCloseKey( hKey ); return -1; } } else { CSimpleShlExt::showerror( GetLastError(), pCmdInfo->hwnd, "RegOpenKeyEx failed for Username with error code :: " ); return -1; } if( RegOpenKeyEx( HKEY_CURRENT_USER, TEXT("SOFTWARE\\Kampi Corporation\\RunAs!"), 0, KEY_QUERY_VALUE ,&hKey ) == ERROR_SUCCESS ) { if( RegQueryValueEx( hKey, TEXT("Password"), 0, &dwType, (LPBYTE)buf, &dwBufSize ) == ERROR_SUCCESS ) { memset( szMsg, 0, sizeof( szMsg ) ); wsprintf ( szMsg, _T("%s"), buf ); mbstowcs( wpass, szMsg, 255 ); RegCloseKey( hKey ); } else { char test[200]; sprintf(test,"Can not query for Password key value! EC: %d",GetLastError() ); MessageBox ( pCmdInfo->hwnd, test, _T("RunAs!"), MB_ICONERROR ); RegCloseKey( hKey ); return -1; } } else { CSimpleShlExt::showerror( GetLastError(), pCmdInfo->hwnd, "RegOpenKeyEx failed for Password with error code :: " ); return -1; } if( RegOpenKeyEx( HKEY_CURRENT_USER, TEXT("SOFTWARE\\Kampi Corporation\\RunAs!"), 0, KEY_QUERY_VALUE ,&hKey ) == ERROR_SUCCESS ) { if( RegQueryValueEx( hKey, TEXT("Domain"), 0, &dwType, (LPBYTE)buf, &dwBufSize ) == ERROR_SUCCESS ) { memset( szMsg, 0, sizeof( szMsg ) ); wsprintf ( szMsg, _T("%s"), buf ); mbstowcs( wdomain, szMsg, 255 ); RegCloseKey( hKey ); } else { char test[200]; sprintf(test,"Can not query for Password key value! EC: %d",GetLastError() ); MessageBox ( pCmdInfo->hwnd, test, _T("RunAs!"), MB_ICONERROR ); RegCloseKey( hKey ); return -1; } } else { CSimpleShlExt::showerror( GetLastError(), pCmdInfo->hwnd, "RegOpenKeyEx failed for Domain with error code :: " ); return -1; }

    Read the article

1